Preserve arity for preserving js optional parameters (#37173)

This commit is contained in:
Wesley Wigham
2020-03-04 00:48:53 -08:00
committed by GitHub
parent 7a82b74983
commit dfc0b58fe7
6 changed files with 77 additions and 3 deletions

View File

@@ -4817,6 +4817,7 @@ namespace ts {
HasLiteralTypes = 1 << 1, // Indicates signature is specialized
IsInnerCallChain = 1 << 2, // Indicates signature comes from a CallChain nested in an outer OptionalChain
IsOuterCallChain = 1 << 3, // Indicates signature comes from a CallChain that is the outermost chain of an optional expression
IsUntypedSignatureInJSFile = 1 << 4, // Indicates signature is from a js file and has no types
// We do not propagate `IsInnerCallChain` to instantiated signatures, as that would result in us
// attempting to add `| undefined` on each recursive call to `getReturnTypeOfSignature` when