Skip to content

Commit f99803d

Browse files
authored
fix(60551): satisfies is shown on go-to-implementation (#60801)
1 parent 32e8f8b commit f99803d

File tree

3 files changed

+44
-1
lines changed

3 files changed

+44
-1
lines changed

src/services/findAllReferences.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ import {
179179
isReferencedFile,
180180
isReferenceFileLocation,
181181
isRightSideOfPropertyAccess,
182+
isSatisfiesExpression,
182183
isShorthandPropertyAssignment,
183184
isSourceFile,
184185
isStatement,
@@ -2282,7 +2283,7 @@ export namespace Core {
22822283
addIfImplementation(body);
22832284
}
22842285
}
2285-
else if (isAssertionExpression(typeHavingNode)) {
2286+
else if (isAssertionExpression(typeHavingNode) || isSatisfiesExpression(typeHavingNode)) {
22862287
addIfImplementation(typeHavingNode.expression);
22872288
}
22882289
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// === goToImplementation ===
2+
// === /a.ts ===
3+
// interface /*GOTO IMPL*/I {
4+
// foo: string;
5+
// }
6+
//
7+
// function f() {
8+
// const foo = [|{ foo: '' }|] satisfies I;
9+
// }
10+
11+
// === Details ===
12+
[
13+
{
14+
"kind": "interface",
15+
"displayParts": [
16+
{
17+
"text": "(",
18+
"kind": "punctuation"
19+
},
20+
{
21+
"text": "object literal",
22+
"kind": "text"
23+
},
24+
{
25+
"text": ")",
26+
"kind": "punctuation"
27+
}
28+
]
29+
}
30+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/// <reference path='fourslash.ts'/>
2+
3+
// @filename: /a.ts
4+
////interface /*def*/I {
5+
//// foo: string;
6+
////}
7+
////
8+
////function f() {
9+
//// const foo = { foo: '' } satisfies [|I|];
10+
////}
11+
12+
verify.baselineGoToImplementation('def');

0 commit comments

Comments
 (0)