@servicenow/sdk - v4.4.1
    Preparing search index...
    interface ModuledNode {
        addExportAssignment(
            structure: OptionalKind<ExportAssignmentStructure>,
        ): ExportAssignment;
        addExportAssignments(
            structures: readonly OptionalKind<ExportAssignmentStructure>[],
        ): ExportAssignment[];
        addExportDeclaration(
            structure: OptionalKind<ExportDeclarationStructure>,
        ): ExportDeclaration;
        addExportDeclarations(
            structures: readonly OptionalKind<ExportDeclarationStructure>[],
        ): ExportDeclaration[];
        addImportDeclaration(
            structure: OptionalKind<ImportDeclarationStructure>,
        ): ImportDeclaration;
        addImportDeclarations(
            structures: readonly OptionalKind<ImportDeclarationStructure>[],
        ): ImportDeclaration[];
        getDefaultExportSymbol(): Symbol | undefined;
        getDefaultExportSymbolOrThrow(message?: string | (() => string)): Symbol;
        getExportAssignment(
            condition: (exportAssignment: ExportAssignment) => boolean,
        ): ExportAssignment | undefined;
        getExportAssignmentOrThrow(
            condition: (exportAssignment: ExportAssignment) => boolean,
            message?: string | (() => string),
        ): ExportAssignment;
        getExportAssignments(): ExportAssignment[];
        getExportDeclaration(
            condition: (exportDeclaration: ExportDeclaration) => boolean,
            message?: string | (() => string),
        ): ExportDeclaration | undefined;
        getExportDeclaration(
            moduleSpecifier: string,
        ): ExportDeclaration | undefined;
        getExportDeclarationOrThrow(
            condition: (exportDeclaration: ExportDeclaration) => boolean,
            message?: string | (() => string),
        ): ExportDeclaration;
        getExportDeclarationOrThrow(
            moduleSpecifier: string,
            message?: string | (() => string),
        ): ExportDeclaration;
        getExportDeclarations(): ExportDeclaration[];
        getExportedDeclarations(): ReadonlyMap<string, ExportedDeclarations[]>;
        getExportSymbols(): Symbol[];
        getImportDeclaration(
            condition: (importDeclaration: ImportDeclaration) => boolean,
        ): ImportDeclaration | undefined;
        getImportDeclaration(
            moduleSpecifier: string,
        ): ImportDeclaration | undefined;
        getImportDeclarationOrThrow(
            condition: (importDeclaration: ImportDeclaration) => boolean,
        ): ImportDeclaration;
        getImportDeclarationOrThrow(moduleSpecifier: string): ImportDeclaration;
        getImportDeclarations(): ImportDeclaration[];
        insertExportAssignment(
            index: number,
            structure: OptionalKind<ExportAssignmentStructure>,
        ): ExportAssignment;
        insertExportAssignments(
            index: number,
            structures: readonly OptionalKind<ExportAssignmentStructure>[],
        ): ExportAssignment[];
        insertExportDeclaration(
            index: number,
            structure: OptionalKind<ExportDeclarationStructure>,
        ): ExportDeclaration;
        insertExportDeclarations(
            index: number,
            structures: readonly OptionalKind<ExportDeclarationStructure>[],
        ): ExportDeclaration[];
        insertImportDeclaration(
            index: number,
            structure: OptionalKind<ImportDeclarationStructure>,
        ): ImportDeclaration;
        insertImportDeclarations(
            index: number,
            structures: readonly OptionalKind<ImportDeclarationStructure>[],
        ): ImportDeclaration[];
        removeDefaultExport(defaultExportSymbol?: Symbol): this;
    }
    Index

    Methods

    • Gets the default export symbol.

      Returns Symbol | undefined

    • Gets the default export symbol or throws if it doesn't exist.

      Parameters

      • Optionalmessage: string | (() => string)

      Returns Symbol

    • Gets the first export assignment that matches a condition, or undefined if it doesn't exist.

      Parameters

      • condition: (exportAssignment: ExportAssignment) => boolean

        Condition to get the export assignment by.

      Returns ExportAssignment | undefined

    • Gets the first export assignment that matches a condition, or throws if it doesn't exist.

      Parameters

      • condition: (exportAssignment: ExportAssignment) => boolean

        Condition to get the export assignment by.

      • Optionalmessage: string | (() => string)

      Returns ExportAssignment

    • Get the file's export assignments.

      Returns ExportAssignment[]

    • Parameters

      • condition: (exportDeclaration: ExportDeclaration) => boolean
      • Optionalmessage: string | (() => string)

      Returns ExportDeclaration | undefined

    • Gets the first export declaration that matches a module specifier, or undefined if it doesn't exist.

      Parameters

      • moduleSpecifier: string

      Returns ExportDeclaration | undefined

    • Gets the first export declaration that matches a condition, or throws if it doesn't exist.

      Parameters

      • condition: (exportDeclaration: ExportDeclaration) => boolean

        Condition to get the export declaration by.

      • Optionalmessage: string | (() => string)

      Returns ExportDeclaration

    • Gets the first export declaration that matches a module specifier, or throws if it doesn't exist.

      Parameters

      • moduleSpecifier: string
      • Optionalmessage: string | (() => string)

      Returns ExportDeclaration

    • Get the export declarations.

      Returns ExportDeclaration[]

    • Gets all the declarations that are exported from the module.

      The key is the name it's exported on and the value is the array of declarations for that name.

      This will include declarations that are transitively exported from other modules. If you mean to get the export declarations then use .getExportDeclarations().

      Returns ReadonlyMap<string, ExportedDeclarations[]>

    • Gets the export symbols.

      Returns Symbol[]

    • Gets the first import declaration that matches a condition, or undefined if it doesn't exist.

      Parameters

      • condition: (importDeclaration: ImportDeclaration) => boolean

        Condition to get the import declaration by.

      Returns ImportDeclaration | undefined

    • Gets the first import declaration that matches a module specifier, or undefined if it doesn't exist.

      Parameters

      • moduleSpecifier: string

      Returns ImportDeclaration | undefined

    • Gets the first import declaration that matches a condition, or throws if it doesn't exist.

      Parameters

      • condition: (importDeclaration: ImportDeclaration) => boolean

        Condition to get the import declaration by.

      Returns ImportDeclaration

    • Gets the first import declaration that matches a module specifier, or throws if it doesn't exist.

      Parameters

      • moduleSpecifier: string

      Returns ImportDeclaration

    • Get the module's import declarations.

      Returns ImportDeclaration[]

    • Removes any "export default".

      Parameters

      • OptionaldefaultExportSymbol: Symbol

      Returns this