Skip to content

Commit ee00744

Browse files
committed
fix: fix outline for localized typescript (use logic from completions)
fixes #135
1 parent 8c07026 commit ee00744

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

typescript/src/codeActions/functionExtractors.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { equals } from 'rambda'
21
import { GetConfig } from '../types'
32
import {
43
createDummySourceFile,

typescript/src/definitions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export default (proxy: ts.LanguageService, languageService: ts.LanguageService,
108108
}
109109
}
110110
}
111-
return
111+
return prior
112112
}
113113

114114
if (__WEB__) {

typescript/src/getPatchedNavTree.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ const getPatchedNavModule = (additionalFeatures: AdditionalFeatures): { getNavig
128128
})
129129
const notFoundVariables = new Set<string>()
130130
const cannotFindCodes = getCannotFindCodes({ includeFromLib: false })
131-
for (const { code, messageText } of languageService.getSemanticDiagnostics('main.ts')) {
131+
for (const { code, start, length } of languageService.getSemanticDiagnostics('main.ts')) {
132132
if (!cannotFindCodes.includes(code)) continue
133-
const notFoundName = (typeof messageText === 'object' ? messageText.messageText : messageText).match(/^Cannot find name '(.+?)'./)?.[1]
133+
const notFoundName = moduleString.slice(start, start! + length!)
134134
if (!notFoundName) continue
135135
notFoundVariables.add(notFoundName)
136136
}

0 commit comments

Comments
 (0)