Module

x/ts_morph/ts_morph.d.ts>CodeBlockWriter#withIndentationLevel

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Latest
method CodeBlockWriter.prototype.withIndentationLevel
import { CodeBlockWriter } from "https://dotland.deno.dev/x/ts_morph@22.0.0/ts_morph.d.ts";

Sets the indentation level within the provided action and restores the writer's indentation state afterwards.

Parameters

indentationLevel: number
  • Indentation level to set.
action: () => void
  • Action to perform with the indentation.

Sets the indentation level with the provided indentation text within the provided action and restores the writer's indentation state afterwards.

Parameters

whitespaceText: string
  • Gets the indentation level from the indentation text.
action: () => void
  • Action to perform with the indentation.