Skip to main content
Module

x/ts_morph/mod.ts>CodeBlockWriter#withIndentationLevel

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
method CodeBlockWriter.prototype.withIndentationLevel
import { CodeBlockWriter } from "https://deno.land/x/ts_morph@15.1.0/mod.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.