Skip to content

Commit 8f54f82

Browse files
authored
Fix type errors (#329)
These type errors were caused by TypeScript updates.
1 parent d1c1725 commit 8f54f82

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

packages/language-service/lib/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ export function createMdxLanguageService(ts, host, plugins) {
442442
snapshot?.getShadowPosition(position) ?? position,
443443
findInStrings,
444444
findInComments,
445-
providePrefixAndSuffixTextForRename
445+
/** @type {boolean} */ (providePrefixAndSuffixTextForRename)
446446
)
447447

448448
if (!locations) {
@@ -649,6 +649,12 @@ export function createMdxLanguageService(ts, host, plugins) {
649649
getImplementationAtPosition: notImplemented('getImplementationAtPosition'),
650650
getIndentationAtPosition: notImplemented('getIndentationAtPosition'),
651651
getJsxClosingTagAtPosition: notImplemented('getJsxClosingTagAtPosition'),
652+
getLinkedEditingRangeAtPosition: notImplemented(
653+
'getLinkedEditingRangeAtPosition'
654+
),
655+
getMoveToRefactoringFileSuggestions: notImplemented(
656+
'getMoveToRefactoringFileSuggestions'
657+
),
652658
getNameOrDottedNameSpan: notImplemented('getNameOrDottedNameSpan'),
653659

654660
getNavigateToItems(searchValue, maxResultCount, fileName, excludeDtsFiles) {
@@ -676,7 +682,6 @@ export function createMdxLanguageService(ts, host, plugins) {
676682
},
677683

678684
getNavigationTree: notImplemented('getNavigationTree'),
679-
getOccurrencesAtPosition: notImplemented('getOccurrencesAtPosition'),
680685

681686
getOutliningSpans(fileName) {
682687
const snapshot = syncSnapshot(fileName)

packages/language-service/lib/object.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ export function bindAll(object) {
2525
}
2626

2727
const value = object[k]
28-
copy[k] = typeof value === 'function' ? value.bind(object) : value
28+
copy[k] =
29+
typeof value === 'function'
30+
? /** @type {Function} */ (value).bind(object)
31+
: value
2932
}
3033

3134
proto = Object.getPrototypeOf(proto)

0 commit comments

Comments
 (0)