Skip to main content
The Deno 2 Release Candidate is here
Learn more
Go to Latest
method CodeBlockWriter.prototype.withIndentationLevel
import { CodeBlockWriter } from "https://deno.land/x/dnt@0.36.0/lib/mod.deps.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.