UNPKG

capnpc-ts

Version:

Cap'n Proto schema compiler for TypeScript.

15 lines (14 loc) 1.09 kB
/** * @author jdiaz5513 */ import * as s from "capnp-ts/src/std/schema.capnp.js"; import ts from "typescript"; import { CodeGeneratorFileContext } from "./code-generator-file-context"; export declare function createClassExtends(identifierText: string): ts.HeritageClause; export declare function createConcreteListProperty(ctx: CodeGeneratorFileContext, field: s.Field): ts.PropertyDeclaration; export declare function createConstProperty(node: s.Node): ts.PropertyDeclaration; export declare function createExpressionBlock(expressions: ts.Expression[], returns: boolean, allowSingleLine: boolean): ts.Block; export declare function createMethod(name: string, parameters: ts.ParameterDeclaration[], type: ts.TypeNode | undefined, expressions: ts.Expression[], allowSingleLine?: boolean): ts.MethodDeclaration; export declare function createNestedNodeProperty(node: s.Node): ts.PropertyDeclaration; export declare function createUnionConstProperty(fullClassName: string, field: s.Field): ts.PropertyDeclaration; export declare function createValueExpression(value: s.Value): ts.Expression;