@servicenow/sdk - v4.4.1
    Preparing search index...
    interface DecoratableNode {
        addDecorator(structure: OptionalKind<DecoratorStructure>): Decorator;
        addDecorators(
            structures: readonly OptionalKind<DecoratorStructure>[],
        ): Decorator[];
        getDecorator(name: string): Decorator | undefined;
        getDecorator(
            findFunction: (declaration: Decorator) => boolean,
        ): Decorator | undefined;
        getDecoratorOrThrow(name: string): Decorator;
        getDecoratorOrThrow(
            findFunction: (declaration: Decorator) => boolean,
        ): Decorator;
        getDecorators(): Decorator[];
        insertDecorator(
            index: number,
            structure: OptionalKind<DecoratorStructure>,
        ): Decorator;
        insertDecorators(
            index: number,
            structures: readonly OptionalKind<DecoratorStructure>[],
        ): Decorator[];
    }

    Hierarchy (View Summary)

    Index

    Methods

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

      Parameters

      • name: string

        Name of the parameter.

      Returns Decorator | undefined

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

      Parameters

      • findFunction: (declaration: Decorator) => boolean

        Function to use to find the parameter.

      Returns Decorator | undefined

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

      Parameters

      • name: string

        Name of the parameter.

      Returns Decorator

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

      Parameters

      • findFunction: (declaration: Decorator) => boolean

        Function to use to find the parameter.

      Returns Decorator

    • Gets all the decorators of the node.

      Returns Decorator[]

    • Inserts a decorator.

      Parameters

      • index: number

        Child index to insert at. Specify a negative index to insert from the reverse.

      • structure: OptionalKind<DecoratorStructure>

        Structure of the decorator.

      Returns Decorator