mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 20:14:01 -06:00
Add 'string' ScriptElementKind (#23821)
This commit is contained in:
parent
05b250691f
commit
2604bb4dd3
@ -81,7 +81,7 @@ namespace ts.Completions {
|
||||
return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: completion.hasIndexSignature, entries };
|
||||
}
|
||||
case StringLiteralCompletionKind.Types: {
|
||||
const entries = completion.types.map(type => ({ name: type.value, kindModifiers: ScriptElementKindModifier.none, kind: ScriptElementKind.typeElement, sortText: "0" }));
|
||||
const entries = completion.types.map(type => ({ name: type.value, kindModifiers: ScriptElementKindModifier.none, kind: ScriptElementKind.string, sortText: "0" }));
|
||||
return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: completion.isNewIdentifier, entries };
|
||||
}
|
||||
default:
|
||||
|
||||
@ -995,6 +995,9 @@ namespace ts {
|
||||
* <JsxTagName attribute1 attribute2={0} />
|
||||
*/
|
||||
jsxAttribute = "JSX attribute",
|
||||
|
||||
/** String literal */
|
||||
string = "string",
|
||||
}
|
||||
|
||||
export const enum ScriptElementKindModifier {
|
||||
|
||||
@ -5021,7 +5021,9 @@ declare namespace ts {
|
||||
/**
|
||||
* <JsxTagName attribute1 attribute2={0} />
|
||||
*/
|
||||
jsxAttribute = "JSX attribute"
|
||||
jsxAttribute = "JSX attribute",
|
||||
/** String literal */
|
||||
string = "string"
|
||||
}
|
||||
enum ScriptElementKindModifier {
|
||||
none = "",
|
||||
|
||||
@ -5021,7 +5021,9 @@ declare namespace ts {
|
||||
/**
|
||||
* <JsxTagName attribute1 attribute2={0} />
|
||||
*/
|
||||
jsxAttribute = "JSX attribute"
|
||||
jsxAttribute = "JSX attribute",
|
||||
/** String literal */
|
||||
string = "string"
|
||||
}
|
||||
enum ScriptElementKindModifier {
|
||||
none = "",
|
||||
|
||||
@ -21,7 +21,7 @@ goTo.marker("path");
|
||||
verify.completionListContains("other", "other", "", "script");
|
||||
|
||||
goTo.marker("type");
|
||||
verify.completionListContains("a", "a", "", "type");
|
||||
verify.completionListContains("a", "a", "", "string");
|
||||
|
||||
goTo.marker("prop");
|
||||
verify.completionListContains("x", "(property) I.x: number", "Prop doc ", "property");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user