iapyang
6 years ago
7 changed files with 3872 additions and 1 deletions
@ -0,0 +1,27 @@
|
||||
{ |
||||
"compilerOptions": { |
||||
"sourceMap": true, |
||||
"target": "es2017", |
||||
"module": "es2015", |
||||
"moduleResolution": "node", |
||||
"lib": [ |
||||
"es2017", |
||||
"dom" |
||||
], |
||||
"declaration": true, |
||||
"experimentalDecorators": true, |
||||
"outDir": "./bin", |
||||
"baseUrl": ".", |
||||
"strict": true, |
||||
"strictNullChecks": true, |
||||
"noImplicitAny": true, |
||||
"noUnusedLocals": true, |
||||
"noUnusedParameters": true, |
||||
"noImplicitReturns": true, |
||||
"noFallthroughCasesInSwitch": true |
||||
}, |
||||
"include": [ |
||||
"typescript/*.ts", |
||||
"typescript/**/*.ts" |
||||
] |
||||
} |
@ -0,0 +1,3 @@
|
||||
export declare type _addI18n = (v: string) => string; |
||||
|
||||
export declare type _i18nText = (key: string) => string; |
@ -0,0 +1,47 @@
|
||||
export declare class _OB { |
||||
protected props: Props | (<T>(config: T) => Props & T); |
||||
|
||||
protected options: Props; |
||||
|
||||
private events?: { |
||||
[eventName: string]: Function[]; |
||||
}; |
||||
|
||||
public init: Function | null; |
||||
|
||||
public destroyed: Function | null; |
||||
|
||||
protected _defaultConfig: (..._args: any[]) => { [key: string]: any } | {}; |
||||
|
||||
protected _init: () => void; |
||||
|
||||
private _initListeners: () => void; |
||||
|
||||
private _getEvents: () => { [eventName: string]: Function[] }; |
||||
|
||||
public on: (eventName: string, fn: Function) => void; |
||||
|
||||
public once: (eventName: string, fn: Function) => void; |
||||
|
||||
public un: (eName: string, fn: Function) => void; |
||||
|
||||
protected _initRef: () => void; |
||||
|
||||
protected _purgeRef: () => void; |
||||
|
||||
public purgeListeners: () => void; |
||||
|
||||
public fireEvent: (eName: string, ...args: any[]) => boolean; |
||||
|
||||
public destroy: () => void; |
||||
} |
||||
|
||||
interface Props { |
||||
listeners?: { |
||||
eventName: string; |
||||
action: (...args: any[]) => any; |
||||
target?: _OB; |
||||
once?: boolean; |
||||
}[]; |
||||
[key: string]: any; |
||||
} |
Loading…
Reference in new issue