UNPKG

ts-simple-ast

Version:

TypeScript compiler wrapper for AST navigation and code generation.

33 lines (32 loc) 934 B
import * as ts from "typescript"; import { Node, Identifier } from "./../common"; import { ImportDeclaration } from "./ImportDeclaration"; export declare class ImportSpecifier extends Node<ts.ImportSpecifier> { /** * Sets the identifier being imported. * @param name - Name being imported. */ setName(name: string): this; /** * Renames the identifier being imported. * @param name - New name. */ renameName(name: string): this; /** * Gets the name of what's being imported. */ getName(): Identifier; /** * Sets the alias for the name being imported. * @param alias - Alias to set. */ setAlias(alias: string): this; /** * Gets the alias, if it exists. */ getAlias(): Identifier | undefined; /** * Gets the import declaration associated with this import specifier. */ getImportDeclaration(): ImportDeclaration; }