We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 231cf85 commit a378623Copy full SHA for a378623
1 file changed
packages/dtsx/src/processor/index.ts
@@ -232,11 +232,13 @@ export function processDeclarations(
232
allTexts.push(exp.text)
233
}
234
235
- // Two-phase import detection: fast includes() on combined text, then regex word-boundary check
236
- const combinedText = allTexts.join('\n')
+ // Two-phase import detection: fast includes() rejection then regex word-boundary check
237
for (const item of allImportedItemsMap.keys()) {
238
- if (combinedText.includes(item) && getCachedRegex(item).test(combinedText)) {
239
- usedImportItems.add(item)
+ for (let t = 0; t < allTexts.length; t++) {
+ if (allTexts[t].includes(item) && getCachedRegex(item).test(allTexts[t])) {
+ usedImportItems.add(item)
240
+ break
241
+ }
242
243
244
0 commit comments