mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Addressed CR feedback.
This commit is contained in:
@@ -403,6 +403,8 @@ module ts {
|
||||
templateSpans: NodeArray<TemplateSpan>;
|
||||
}
|
||||
|
||||
// Each of these corresponds to a substitution expression and a template literal, in that order.
|
||||
// The template literal must have kind TemplateMiddleLiteral or TemplateTailLiteral.
|
||||
export interface TemplateSpan extends Node {
|
||||
expression: Expression;
|
||||
literal: LiteralExpression;
|
||||
@@ -440,8 +442,7 @@ module ts {
|
||||
|
||||
export interface TaggedTemplateExpression extends Expression {
|
||||
tag: Expression;
|
||||
// Either a LiteralExpression of kind NoSubstitutionTemplateLiteral, or a TemplateExpression
|
||||
template: Expression;
|
||||
template: LiteralExpression | TemplateExpression;
|
||||
}
|
||||
|
||||
export interface TypeAssertion extends Expression {
|
||||
|
||||
@@ -2471,12 +2471,12 @@ module ts {
|
||||
}
|
||||
|
||||
function isCompletionListBlocker(previousToken: Node): boolean {
|
||||
return isInStringOrRegularExpressionLiteral(previousToken) ||
|
||||
return isInStringOrRegularExpressionOrTemplateLiteral(previousToken) ||
|
||||
isIdentifierDefinitionLocation(previousToken) ||
|
||||
isRightOfIllegalDot(previousToken);
|
||||
}
|
||||
|
||||
function isInStringOrRegularExpressionLiteral(previousToken: Node): boolean {
|
||||
function isInStringOrRegularExpressionOrTemplateLiteral(previousToken: Node): boolean {
|
||||
if (previousToken.kind === SyntaxKind.StringLiteral || isTemplateLiteralKind(previousToken.kind)) {
|
||||
// The position has to be either: 1. entirely within the token text, or
|
||||
// 2. at the end position, and the string literal is not terminated
|
||||
|
||||
Reference in New Issue
Block a user