Skip to main content
Module

x/ts_morph/ts_morph.d.ts>ModifierableNode

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
interface ModifierableNode
import { type ModifierableNode } from "https://deno.land/x/ts_morph@15.1.0/ts_morph.d.ts";

Methods

getModifiers(): Node[]

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/ts_morph@15.1.0/ts_morph.d.ts";

Type Parameters

T extends Constructor<ModifierableNodeExtensionType>