import { Writers } from "https://deno.land/x/ts_morph@16.0.0/mod.ts";
Functions for writing code.
Static Methods
assertion(type: WriterFunctionOrValue, assertionType: WriterFunctionOrValue): (writer: CodeBlockWriter) => void
Gets a writer function for writing a type assertion (ex. type as assertionType
).
intersectionType(): (writer: CodeBlockWriter) => void
firstType: WriterFunctionOrValue,
secondType: WriterFunctionOrValue,
...additionalTypes: WriterFunctionOrValue[],
Gets a writer function for writing an intersection type (ex. FirstType & SecondType
).
object(obj: { [key: string]: WriterFunctionOrValue | undefined; }): WriterFunction
Gets a writer function for writing the provided object as an object literal expression.
objectType(structure: TypeElementMemberedNodeStructure): WriterFunction
Gets a writer function for writing an object type.
Gets a writer function for writing a return statement returning the provided value (ex. return value;
).
unionType(): (writer: CodeBlockWriter) => void
firstType: WriterFunctionOrValue,
secondType: WriterFunctionOrValue,
...additionalTypes: WriterFunctionOrValue[],
Gets a writer function for writing a union type (ex. FirstType | SecondType
).