Allow extending any, with noImplicitAny errors (#23153)

Allow extending any, without noImplicitAny errors
This commit is contained in:
Nathan Shively-Sanders
2018-04-05 08:52:56 -07:00
committed by GitHub
parent 7520f9578b
commit 154ac342cb
11 changed files with 220 additions and 19 deletions

View File

@@ -17938,6 +17938,9 @@ namespace ts {
function resolveCallExpression(node: CallExpression, candidatesOutArray: Signature[]): Signature {
if (node.expression.kind === SyntaxKind.SuperKeyword) {
const superType = checkSuperExpression(node.expression);
if (isTypeAny(superType)) {
return anySignature;
}
if (superType !== unknownType) {
// In super call, the candidate signatures are the matching arity signatures of the base constructor function instantiated
// with the type arguments specified in the extends clause.