refactor(core): change typedef of NodeCheckFn to pass tsickle

This commit is contained in:
Miško Hevery 2017-02-08 18:05:21 -06:00
parent 24af51a623
commit a7688d27f2
1 changed files with 11 additions and 12 deletions

View File

@ -52,21 +52,20 @@ export type ViewDefinitionFactory = () => ViewDefinition;
export type ViewUpdateFn = (check: NodeCheckFn, view: ViewData) => void; export type ViewUpdateFn = (check: NodeCheckFn, view: ViewData) => void;
// helper functions to create an overloaded function type. // helper functions to create an overloaded function type.
export declare function _nodeCheckFn( export interface NodeCheckFn {
view: ViewData, nodeIndex: number, argStyle: ArgumentType.Dynamic, values: any[]): any; (view: ViewData, nodeIndex: number, argStyle: ArgumentType.Dynamic, values: any[]): any;
export declare function _nodeCheckFn(
view: ViewData, nodeIndex: number, argStyle: ArgumentType.Inline, v0?: any, v1?: any,
v2?: any, v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any):
any;
export type NodeCheckFn = typeof _nodeCheckFn; (view: ViewData, nodeIndex: number, argStyle: ArgumentType.Inline, v0?: any, v1?: any, v2?: any,
v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): any;
}
export type ViewHandleEventFn = export type ViewHandleEventFn =
(view: ViewData, nodeIndex: number, eventName: string, event: any) => boolean; (view: ViewData, nodeIndex: number, eventName: string, event: any) => boolean;
export enum ArgumentType { export enum ArgumentType {
Inline, Dynamic Inline,
} Dynamic
}
/** /**
* Bitmask for ViewDefintion.flags. * Bitmask for ViewDefintion.flags.