mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-01-24 13:30:59 -08:00
157 lines
3.7 KiB
TypeScript
157 lines
3.7 KiB
TypeScript
/* eslint-disable @typescript-eslint/naming-convention */
|
|
declare module 'errio' {
|
|
export function parse(error: Error): Error;
|
|
export function stringify(error: Error): string;
|
|
export function register(error: ErrorConstructor): void;
|
|
}
|
|
|
|
declare module '@tiddlygit/tiddlywiki' {
|
|
export * from 'tiddlywiki';
|
|
}
|
|
|
|
declare module 'espree' {
|
|
// https://github.com/eslint/espree#options
|
|
export interface Options {
|
|
comment?: boolean;
|
|
ecmaFeatures?: {
|
|
globalReturn?: boolean;
|
|
impliedStrict?: boolean;
|
|
jsx?: boolean;
|
|
};
|
|
ecmaVersion?:
|
|
| 3
|
|
| 5
|
|
| 6
|
|
| 7
|
|
| 8
|
|
| 9
|
|
| 10
|
|
| 11
|
|
| 12
|
|
| 2015
|
|
| 2016
|
|
| 2017
|
|
| 2018
|
|
| 2019
|
|
| 2020
|
|
| 2021
|
|
| 2022
|
|
| 'latest';
|
|
loc?: boolean;
|
|
range?: boolean;
|
|
sourceType?: 'script' | 'module';
|
|
tokens?: boolean;
|
|
}
|
|
// https://github.com/eslint/espree#options
|
|
export function parse(code: string, options?: Options): any;
|
|
// https://github.com/eslint/espree#tokenize
|
|
export function tokenize(code: string, options?: Options): any;
|
|
}
|
|
|
|
declare module 'threads-plugin' {
|
|
const value: any;
|
|
export default value;
|
|
}
|
|
declare module 'v8-compile-cache-lib' {
|
|
export namespace __TEST__ {
|
|
export function getMainName(): string;
|
|
export function getCacheDir(): string;
|
|
export function supportsCachedData(): boolean;
|
|
}
|
|
export function install(options?: {
|
|
cacheDir?: string;
|
|
prefix?: string;
|
|
}): {
|
|
uninstall(): void;
|
|
} | undefined;
|
|
}
|
|
declare module 'webpack2-externals-plugin' {
|
|
const value: any;
|
|
export default value;
|
|
}
|
|
declare module '*.png' {
|
|
const value: string;
|
|
export default value;
|
|
}
|
|
declare module '*.svg' {
|
|
const value: string;
|
|
export default value;
|
|
}
|
|
declare module '@authing/sso' {
|
|
export interface ILoginInfo {
|
|
urlParams: UrlParameters;
|
|
userInfo: UserInfo;
|
|
}
|
|
export interface ITrackSessionResultSuccess extends ILoginInfo {
|
|
session: Session;
|
|
}
|
|
export interface ITrackSessionResultFailed {
|
|
session: null;
|
|
}
|
|
export type ITrackSessionResult = ITrackSessionResultSuccess | ITrackSessionResultFailed;
|
|
|
|
export interface Session {
|
|
appId: string;
|
|
type: string;
|
|
userId: string;
|
|
}
|
|
|
|
export interface UserInfo {
|
|
_id: string;
|
|
company: string;
|
|
email: string;
|
|
nickname: string;
|
|
oauth?: string;
|
|
photo: string;
|
|
registerInClient: string;
|
|
thirdPartyIdentity?: {
|
|
accessToken?: string;
|
|
provider?: string;
|
|
};
|
|
token: string;
|
|
tokenExpiredAt: string;
|
|
username: string;
|
|
}
|
|
|
|
export interface UrlParameters {
|
|
access_token: string;
|
|
code: string;
|
|
id_token: string;
|
|
}
|
|
|
|
export default class AuthingSSO {
|
|
constructor(options: { appDomain: string; appId: string; redirectUrl: string });
|
|
trackSession(): Promise<ITrackSessionResult>;
|
|
logout(): Promise<{ code: number; message?: string }>;
|
|
login(): Promise<void>;
|
|
}
|
|
}
|
|
|
|
interface IDefaultGatewayInfo {
|
|
gateway: string;
|
|
interface: 'WLAN';
|
|
}
|
|
declare module 'default-gateway/ibmi' {
|
|
export function v4(): Promise<IDefaultGatewayInfo>;
|
|
}
|
|
declare module 'default-gateway/android' {
|
|
export function v4(): Promise<IDefaultGatewayInfo>;
|
|
}
|
|
declare module 'default-gateway/darwin' {
|
|
export function v4(): Promise<IDefaultGatewayInfo>;
|
|
}
|
|
declare module 'default-gateway/freebsd' {
|
|
export function v4(): Promise<IDefaultGatewayInfo>;
|
|
}
|
|
declare module 'default-gateway/linux' {
|
|
export function v4(): Promise<IDefaultGatewayInfo>;
|
|
}
|
|
declare module 'default-gateway/openbsd' {
|
|
export function v4(): Promise<IDefaultGatewayInfo>;
|
|
}
|
|
declare module 'default-gateway/sunos' {
|
|
export function v4(): Promise<IDefaultGatewayInfo>;
|
|
}
|
|
declare module 'default-gateway/win32' {
|
|
export function v4(): Promise<IDefaultGatewayInfo>;
|
|
}
|