@kubb/ts-codegen
Advanced tools
Comparing version 1.1.6 to 1.1.7
@@ -51,7 +51,7 @@ import { createRequire } from 'module'; | ||
} | ||
const text = filteredComments.reduce((acc, comment) => { | ||
const text = filteredComments.reduce((acc = "", comment = "") => { | ||
return `${acc} | ||
* ${comment}`; | ||
}, "*"); | ||
return ts.addSyntheticLeadingComment(node, ts.SyntaxKind.MultiLineCommentTrivia, `${text} | ||
return ts.addSyntheticLeadingComment(node, ts.SyntaxKind.MultiLineCommentTrivia, `${text || "*"} | ||
`, true); | ||
@@ -58,0 +58,0 @@ } |
{ | ||
"name": "@kubb/ts-codegen", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"description": "Generator ts-codegen", | ||
@@ -46,3 +46,6 @@ "repository": { | ||
"devDependencies": { | ||
"tsup": "^6.7.0" | ||
"eslint": "^8.42.0", | ||
"tsup": "^6.7.0", | ||
"@kubb/tsup-config": "0.1.0", | ||
"@kubb/eslint-config": "0.1.0" | ||
}, | ||
@@ -61,4 +64,4 @@ "publishConfig": { | ||
"release": "pnpm publish --no-git-check", | ||
"pre-commit": "echo 'pre-commit not configured'", | ||
"pre-push": "pnpm typecheck", | ||
"lint": "eslint \"**/*.{ts,tsx}\"", | ||
"lint-fix": "eslint \"**/*.{ts,tsx}\" --quiet --fix", | ||
"test": "vitest --passWithNoTests", | ||
@@ -65,0 +68,0 @@ "upgrade": "pnpm update", |
@@ -64,7 +64,7 @@ import ts from 'typescript' | ||
const text = filteredComments.reduce((acc, comment) => { | ||
const text = filteredComments.reduce((acc = '', comment = '') => { | ||
return `${acc}\n* ${comment}` | ||
}, '*') | ||
return ts.addSyntheticLeadingComment(node, ts.SyntaxKind.MultiLineCommentTrivia, `${text}\n`, true) | ||
return ts.addSyntheticLeadingComment(node, ts.SyntaxKind.MultiLineCommentTrivia, `${text || '*'}\n`, true) | ||
} | ||
@@ -71,0 +71,0 @@ |
Sorry, the diff of this file is not supported yet
33787
4