Skip to main content
Module

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

Compile your Deno project to run on Node.js.
Go to Latest
class ImportClause
extends ImportClauseBase<ts.ImportClause>
import { ImportClause } from "https://deno.land/x/deno2node@v1.7.1/src/deps.deno.ts";

Methods

Gets the default import or returns undefined if it doesn't exist.

getDefaultImportOrThrow(message?: string | (() => string)): Identifier

Gets the default import or throws if it doesn't exit.

Gets the named bindings of the import clause or returns undefined if it doesn't exist.

getNamedBindingsOrThrow(message?: string | (() => string)): NamespaceImport | NamedImports

Gets the named bindings of the import clause or throws if it doesn't exist.

Gets the namespace import identifier, if it exists.

Gets the namespace import identifier, if it exists.

getNamespaceImportOrThrow(message?: string | (() => string)): Identifier

Gets the namespace import if it exists or throws.

getParent(): NodeParentType<ts.ImportClause>
getParentOrThrow(message?: string | (() => string)): NonNullable<NodeParentType<ts.ImportClause>>
isTypeOnly(): boolean

Gets if this import clause is type only.

setIsTypeOnly(value: boolean): this

Sets if this import declaration is type only.