core-types-ts
Advanced tools
Comparing version 3.2.0 to 3.3.0
@@ -21,2 +21,3 @@ "use strict"; | ||
const { warn = defaultWarn(sourceCode), namespaces = 'ignore', nonExported = 'include-if-referenced', unsupported = 'ignore', } = options !== null && options !== void 0 ? options : {}; | ||
const notConvertedTypes = new Set(); | ||
const sourceFile = ts.createSourceFile("filename.ts", sourceCode, ts.ScriptTarget.Latest, | ||
@@ -43,2 +44,11 @@ /*setParentNodes */ true); | ||
]; | ||
const registerDeclarationAsNonExported = (exportedDeclaration) => { | ||
const { declaration, namespaceParents } = exportedDeclaration; | ||
const fullName = [ | ||
...namespaceParents, | ||
declaration.name.getText(), | ||
] | ||
.join('.'); | ||
notConvertedTypes.add(fullName); | ||
}; | ||
const filterConflicts = (declarations) => { | ||
@@ -57,3 +67,7 @@ const byName = new Map(); | ||
byName.set(name, exportedDeclaration); | ||
registerDeclarationAsNonExported(item); | ||
} | ||
else { | ||
registerDeclarationAsNonExported(exportedDeclaration); | ||
} | ||
}); | ||
@@ -122,3 +136,2 @@ return [...byName.values()]; | ||
}); | ||
const notConvertedTypes = new Set(); | ||
const convertTopLevel = (statement) => { | ||
@@ -125,0 +138,0 @@ ctx.cyclicState = new Set(); |
{ | ||
"name": "core-types-ts", | ||
"version": "3.2.0", | ||
"version": "3.3.0", | ||
"description": "core-types ⬌ TypeScript interface conversion", | ||
@@ -5,0 +5,0 @@ "author": "Gustaf Räntilä", |
50794
978