|
@@ -5,6 +5,8 @@ import { LSPluginCaller } from './LSPlugin.caller'
|
|
import { LSPluginExperiments } from './modules/LSPlugin.Experiments'
|
|
import { LSPluginExperiments } from './modules/LSPlugin.Experiments'
|
|
import { LSPluginFileStorage } from './modules/LSPlugin.Storage'
|
|
import { LSPluginFileStorage } from './modules/LSPlugin.Storage'
|
|
|
|
|
|
|
|
+export type WithOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
|
|
+
|
|
export type PluginLocalIdentity = string
|
|
export type PluginLocalIdentity = string
|
|
|
|
|
|
export type ThemeMode = 'light' | 'dark'
|
|
export type ThemeMode = 'light' | 'dark'
|
|
@@ -114,6 +116,23 @@ export type IDatom = [e: number, a: string, v: any, t: number, added: boolean]
|
|
|
|
|
|
export type IGitResult = { stdout: string; stderr: string; exitCode: number }
|
|
export type IGitResult = { stdout: string; stderr: string; exitCode: number }
|
|
|
|
|
|
|
|
+export type IRequestOptions<R = any> = {
|
|
|
|
+ url: string
|
|
|
|
+ headers: Record<string, string>
|
|
|
|
+ method: 'GET' | 'POST' | 'PUT' | 'DELETE'
|
|
|
|
+ data: any
|
|
|
|
+ timeout: number
|
|
|
|
+ dataType: 'json' | 'text' | 'base64' | 'arraybuffer'
|
|
|
|
+ success: (result: R) => void
|
|
|
|
+ fail: (err: any) => void
|
|
|
|
+ final: () => void
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export type IRequestTask<R> = {
|
|
|
|
+ abort: () => void
|
|
|
|
+ promise: Promise<R>
|
|
|
|
+}
|
|
|
|
+
|
|
export interface AppUserInfo {
|
|
export interface AppUserInfo {
|
|
[key: string]: any
|
|
[key: string]: any
|
|
}
|
|
}
|