Skip to main content
Module

x/deno2node/src/deps.deno.ts>ModifierableNode

Compile your Deno project to run on Node.js.
Go to Latest
interface ModifierableNode
import { type ModifierableNode } from "https://deno.land/x/deno2node@v1.7.1/src/deps.deno.ts";

Methods

getModifiers(): Node<ts.Modifier>[]

Gets the node's modifiers.

getFirstModifierByKindOrThrow<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind]

Gets the first modifier of the specified syntax kind or throws if none found.

getFirstModifierByKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind] | undefined

Gets the first modifier of the specified syntax kind or undefined if none found.

hasModifier(kind: SyntaxKind): boolean

Gets if it has the specified modifier.

hasModifier(text: ModifierTexts): boolean

Gets if it has the specified modifier.

toggleModifier(text: ModifierTexts, value?: boolean): this

Toggles a modifier.

function ModifierableNode
import { ModifierableNode } from "https://deno.land/x/deno2node@v1.7.1/src/deps.deno.ts";

Type Parameters

T extends Constructor<ModifierableNodeExtensionType>