mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
Support '/' as a trigger character in path completions (#24042)
This commit is contained in:
@@ -2218,7 +2218,9 @@ namespace ts.Completions {
|
||||
// Opening JSX tag
|
||||
return contextToken.kind === SyntaxKind.LessThanToken && contextToken.parent.kind !== SyntaxKind.BinaryExpression;
|
||||
case "/":
|
||||
return isJsxClosingElement(contextToken.parent);
|
||||
return isStringLiteralLike(contextToken)
|
||||
? !!tryGetImportFromModuleSpecifier(contextToken)
|
||||
: contextToken.kind === SyntaxKind.SlashToken && isJsxClosingElement(contextToken.parent);
|
||||
default:
|
||||
return Debug.assertNever(triggerCharacter);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user