Module

x/ts_morph/ts_morph.d.ts>Writers

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
class Writers
import { Writers } from "https://dotland.deno.dev/x/ts_morph@17.0.0/ts_morph.d.ts";

Functions for writing code.

Constructors

new
private
Writers()

Static Methods

assertion(type: WriterFunctionOrValue, assertionType: WriterFunctionOrValue): (writer: CodeBlockWriter) => void

Gets a writer function for writing a type assertion (ex. type as assertionType).

intersectionType(
...additionalTypes: WriterFunctionOrValue[],
): (writer: CodeBlockWriter) => void

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.

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(
...additionalTypes: WriterFunctionOrValue[],
): (writer: CodeBlockWriter) => void

Gets a writer function for writing a union type (ex. FirstType | SecondType).