UNPKG

@protobuf-ts/plugin

Version:

The protocol buffer compiler plugin "protobuf-ts" generates TypeScript, gRPC-web, Twirp, and more.

24 lines (23 loc) 586 B
import * as ts from "typescript"; export declare class TypescriptFile { private sf; constructor(filename: string); getFilename(): string; /** * Add the new statement to the file. */ addStatement(statement: ts.Statement, atTop?: boolean): void; /** * The underlying SourceFile */ getSourceFile(): ts.SourceFile; /** * Are there any statements in this file? */ isEmpty(): boolean; /** * The full content of this file. * Returns an empty string if there are no statements. */ getContent(): string; }