UNPKG

ng2-bootstrap-base-modified

Version:

Native Angular Bootstrap Components Typeahead modified

56 lines (47 loc) 1.06 kB
/** * @author ng-team * @copyright ng-bootstrap */ export interface ClassDesc { fileName: string; className: string; description: string; properties: PropertyDesc[]; methods: MethodDesc[]; } export interface DirectiveDesc extends ClassDesc { selector: string; exportAs?: string; inputs: InputDesc[]; outputs: OutputDesc[]; } export interface PropertyDesc { name: string; type: string; description: string; defaultValue?: string; } export interface MethodDesc { name: string; description: string; args: ArgumentDesc[]; returnType: string; } export interface ArgumentDesc { name: string; type: string; } export interface InputDesc extends PropertyDesc { } export interface OutputDesc extends PropertyDesc { } /** * :D */ export class NgApiDoc { [key: string]: any; } export function signature(method: MethodDesc): string { const args = method.args.map((arg:ArgumentDesc) => `${arg.name}: ${arg.type}`).join(', '); return `${method.name}(${args})`; }