Skip to content

Commit 0f135b9

Browse files
committed
Fix adding declaration types on svelte transformer
1 parent 1f8e3d0 commit 0f135b9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Typescript declaration generator for svelte with typescript",
44
"main": "dist/index.js",
55
"types": "dist/index.ts",
6-
"version": "0.3.4",
6+
"version": "0.3.5",
77
"license": "MIT",
88
"homepage": "https://github.com/andrelmlins/svelte-dts",
99
"repository": "https://github.com/andrelmlins/svelte-dts",

src/transformer/svelte.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class SvelteTransformer implements ITransformer {
6060
(item) => item.getText(this.sourceFile) === newType.getText(this.sourceFile)
6161
);
6262

63-
if (!includeType) {
63+
if (!includeType || this.typesForSearch.length === 0) {
6464
this.typesForSearch.push(newType);
6565
}
6666
}

0 commit comments

Comments
 (0)