es-membrane

Home > ts-morph-structures > ImportDeclarationImpl > clone

ImportDeclarationImpl.clone() method

Create a ImportDeclarationImpl from a ImportDeclarationStructure.

Signature:

static clone(source: OptionalKind<ImportDeclarationStructure>, withTypesArg?: "typesOnly" | "excludeTypes"): ImportDeclarationImpl;

Parameters

Parameter Type Description
source OptionalKind<ImportDeclarationStructure> The structure to clone.
withTypesArg “typesOnly” | “excludeTypes” (Optional) When “typesOnly”, the clone has only type imports. When “excludeTypes”, the clone has no type imports.

Returns:

ImportDeclarationImpl