Skip to main content
Module

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

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

Methods

getDecorator(name: string): Decorator | undefined

Gets a decorator or undefined if it doesn't exist.

getDecorator(findFunction: (declaration: Decorator) => boolean): Decorator | undefined

Gets a decorator or undefined if it doesn't exist.

getDecoratorOrThrow(name: string): Decorator

Gets a decorator or throws if it doesn't exist.

getDecoratorOrThrow(findFunction: (declaration: Decorator) => boolean): Decorator

Gets a decorator or throws if it doesn't exist.

getDecorators(): Decorator[]

Gets all the decorators of the node.

addDecorator(structure: OptionalKind<DecoratorStructure>): Decorator

Adds a decorator.

addDecorators(structures: ReadonlyArray<OptionalKind<DecoratorStructure>>): Decorator[]

Adds decorators.

insertDecorator(index: number, structure: OptionalKind<DecoratorStructure>): Decorator

Inserts a decorator.

insertDecorators(index: number, structures: ReadonlyArray<OptionalKind<DecoratorStructure>>): Decorator[]

Insert decorators.

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

Type Parameters

T extends Constructor<DecoratableNodeExtensionType>