Skip to main content
Module

x/ts_morph/mod.ts>ExportSpecifier

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
class ExportSpecifier
extends ExportSpecifierBase<ts.ExportSpecifier>
import { ExportSpecifier } from "https://deno.land/x/ts_morph@17.0.0/mod.ts";

Methods

getAliasNode(): Identifier | undefined

Gets the alias identifier, if it exists.

getExportDeclaration(): ExportDeclaration

Gets the export declaration associated with this export specifier.

getLocalTargetDeclarations(): LocalTargetDeclarations[]

Gets all the declarations referenced by the export specifier.

getLocalTargetSymbol(): Symbol | undefined

Gets the local target symbol of the export specifier or undefined if it doesn't exist.

getLocalTargetSymbolOrThrow(message?: string | (() => string)): Symbol

Gets the local target symbol of the export specifier or throws if it doesn't exist.

getName(): string

Gets the name of the export specifier.

getNameNode(): Identifier

Gets the name node of what's being exported.

getParent(): NodeParentType<ts.ExportSpecifier>
getParentOrThrow(message?: string | (() => string)): NonNullable<NodeParentType<ts.ExportSpecifier>>
getStructure(): ExportSpecifierStructure

Gets the structure equivalent to this node.

isTypeOnly(): boolean

Gets if this is a type only import specifier.

remove(): void

Removes the export specifier.

removeAlias(): this

Removes the alias without renaming.

Removes the alias and renames any usages to the name of the export specifier.

renameAlias(alias: string): this

Sets the alias for the name being exported and renames all the usages.

set(structure: Partial<ExportSpecifierStructure>): this

Sets the node from a structure.

setAlias(alias: string): this

Sets the alias without renaming all the usages.

setIsTypeOnly(value: boolean): this

Sets if this is a type only import specifier.

setName(name: string): this

Sets the name of what's being exported.