mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Merge pull request #30384 from Microsoft/completionsInTypeParameter
Add extends of type parameter as type only location for completions
This commit is contained in:
commit
2961bc3fc0
@ -1129,6 +1129,9 @@ namespace ts.Completions {
|
||||
|
||||
case SyntaxKind.AsKeyword:
|
||||
return parentKind === SyntaxKind.AsExpression;
|
||||
|
||||
case SyntaxKind.ExtendsKeyword:
|
||||
return parentKind === SyntaxKind.TypeParameter;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
@ -7,4 +7,4 @@
|
||||
////var C4 = class D<T extends /*4*/>{}
|
||||
|
||||
verify.completions({ marker: ["0", "1", "2", "3"], exact: undefined });
|
||||
verify.completions({ marker: "4", exact: ["D", ...completion.globalsPlus(["C0", "C1", "C2", "C3", "C4"])] });
|
||||
verify.completions({ marker: "4", exact: ["D", "T", ...completion.globalTypes] });
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user