Home > ts-morph-structures > ImportDeclarationImpl > clone
Create a ImportDeclarationImpl from a ImportDeclarationStructure.
Signature:
static clone(source: OptionalKind<ImportDeclarationStructure>, withTypesArg?: "typesOnly" | "excludeTypes"): ImportDeclarationImpl;
| 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: