New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow dynamic names in types #15473

Merged
merged 65 commits into from Nov 16, 2017
Commits
Jump to file or symbol
Failed to load files and symbols.
+6 −9
Diff settings

Always

Just for now

Viewing a subset of changes. View all

Merge branch 'master' into dynamicNames

  • Loading branch information...
rbuckton committed Nov 15, 2017
commit a21a129abb423dfdfb07b97df5e83c3abbb4fb15
Copy path View file
@@ -8348,15 +8348,6 @@ namespace ts {
return esSymbolType;
}
function getTypeFromJSDocVariadicType(node: JSDocVariadicType): Type {
const links = getNodeLinks(node);
if (!links.resolvedType) {
const type = getTypeFromTypeNode(node.type);
links.resolvedType = type ? createArrayType(type) : unknownType;
}
return links.resolvedType;
}
function getThisType(node: Node): Type {
const container = getThisContainer(node, /*includeArrowFunctions*/ false);
const parent = container && container.parent;
Copy path View file
@@ -2820,6 +2820,12 @@ namespace ts {
case SyntaxKind.KeyOfKeyword:
case SyntaxKind.UniqueKeyword:
return parseTypeOperator(operator);
case SyntaxKind.DotDotDotToken: {
const result = createNode(SyntaxKind.JSDocVariadicType) as JSDocVariadicType;
nextToken();
result.type = parsePostfixTypeOrHigher();
return finishNode(result);
}
}
return parsePostfixTypeOrHigher();
}
You are viewing a condensed version of this merge commit. You can view the full changes here.
ProTip! Use n and p to navigate between commits in a pull request.