Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno2node/src/deps.deno.ts>CodeBlockWriter#withIndentationLevel

Compile your Deno project to run on Node.js.
Go to Latest
method CodeBlockWriter.prototype.withIndentationLevel
import { CodeBlockWriter } from "https://deno.land/x/deno2node@v1.10.0/src/deps.deno.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.