UNPKG

652 BTypeScriptView Raw
1import * as ts from './ts-ast';
2/**
3 * Convert from a type annotation in Closure syntax to a TypeScript type
4 * expression AST (e.g `Array` => `Array<any>|null`).
5 */
6export declare function closureTypeToTypeScript(closureType: (string | null | undefined), templateTypes?: string[]): ts.Type;
7/**
8 * Convert from a parameter type annotation in Closure syntax to a TypeScript
9 * type expression AST
10 * (e.g `Array=` => `{type: 'Array<any>|null', optional: true}`).
11 */
12export declare function closureParamToTypeScript(closureType: (string | null | undefined), templateTypes?: string[]): {
13 type: ts.Type;
14 optional: boolean;
15 rest: boolean;
16};