import { Writers } from "https://dotland.deno.dev/x/ts_morph@17.0.0/ts_morph.d.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
).