Skip to content

Commit

Permalink
update types
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhan committed Feb 23, 2022
1 parent a75819f commit 5165d5d
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion types/index.d.ts
Expand Up @@ -2,7 +2,21 @@ import type {Component} from 'san';
interface DataObj {
[key: string]: any;
}
declare type Creator = (context?: Component) => void;
interface ComponentContext {
el(): Component['el'];
owner(): Component | undefined;
parentComponent(): Component['parentComponent'];
dispatch: Component['dispatch'];
fire: Component['fire'];
ref: Component['ref'];
nextTick: Component['nextTick'];
data: {
get: Component['data']['get'],
set: Component['data']['set']
};
}

declare type Creator = (context?: ComponentContext) => void;
declare type TFunction = (...args: any) => any;
declare type NFunction = (...args: any) => void;
interface ClassMemberCreator {
Expand Down

0 comments on commit 5165d5d

Please sign in to comment.