@kubb/ts-codegen
Advanced tools
Comparing version 1.0.0-beta.15 to 1.0.0-beta.16
@@ -82,7 +82,7 @@ import { createRequire } from 'module'; | ||
} | ||
function createImportDeclaration({ name, path, asType }) { | ||
function createImportDeclaration({ name, path, asType = false }) { | ||
if (!Array.isArray(name)) { | ||
return factory.createImportDeclaration( | ||
void 0, | ||
factory.createImportClause(asType ?? false, factory.createIdentifier(name), void 0), | ||
factory.createImportClause(asType, factory.createIdentifier(name), void 0), | ||
factory.createStringLiteral(path), | ||
@@ -95,3 +95,3 @@ void 0 | ||
factory.createImportClause( | ||
asType ?? true, | ||
asType, | ||
void 0, | ||
@@ -98,0 +98,0 @@ factory.createNamedImports( |
{ | ||
"name": "@kubb/ts-codegen", | ||
"version": "1.0.0-beta.15", | ||
"version": "1.0.0-beta.16", | ||
"description": "Generator ts-codegen", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -120,7 +120,7 @@ import ts from 'typescript' | ||
export function createImportDeclaration({ name, path, asType }: { name: string | Array<ts.Identifier | string>; path: string; asType?: boolean }) { | ||
export function createImportDeclaration({ name, path, asType = false }: { name: string | Array<ts.Identifier | string>; path: string; asType?: boolean }) { | ||
if (!Array.isArray(name)) { | ||
return factory.createImportDeclaration( | ||
undefined, | ||
factory.createImportClause(asType ?? false, factory.createIdentifier(name), undefined), | ||
factory.createImportClause(asType, factory.createIdentifier(name), undefined), | ||
factory.createStringLiteral(path), | ||
@@ -134,3 +134,3 @@ undefined | ||
factory.createImportClause( | ||
asType ?? true, | ||
asType, | ||
undefined, | ||
@@ -137,0 +137,0 @@ factory.createNamedImports( |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
55057