diff --git a/internal/checker/nodebuilder.go b/internal/checker/nodebuilder.go index 62ebb1a3f8..5a9a54b4c5 100644 --- a/internal/checker/nodebuilder.go +++ b/internal/checker/nodebuilder.go @@ -40,11 +40,13 @@ func (b *NodeBuilder) enterContext(enclosingDeclaration *ast.Node, flags nodebui } func (b *NodeBuilder) popContext() { - b.impl.ctx = nil - if len(b.ctxStack) > 1 { - b.impl.ctx = b.ctxStack[len(b.ctxStack)-1] + stackSize := len(b.ctxStack) + if stackSize == 0 { + b.impl.ctx = nil + } else { + b.impl.ctx = b.ctxStack[stackSize-1] + b.ctxStack = b.ctxStack[:stackSize-1] } - b.ctxStack = b.ctxStack[:len(b.ctxStack)-1] } func (b *NodeBuilder) exitContext(result *ast.Node) *ast.Node { @@ -165,7 +167,7 @@ func (b *NodeBuilder) TypeToTypeNode(typ *Type, enclosingDeclaration *ast.Node, func NewNodeBuilder(ch *Checker, e *printer.EmitContext) *NodeBuilder { impl := newNodeBuilderImpl(ch, e) - return &NodeBuilder{impl: &impl, ctxStack: make([]*NodeBuilderContext, 0, 1), host: ch.program} + return &NodeBuilder{impl: impl, ctxStack: make([]*NodeBuilderContext, 0, 1), host: ch.program} } func (c *Checker) GetDiagnosticNodeBuilder() *NodeBuilder { diff --git a/internal/checker/nodebuilderimpl.go b/internal/checker/nodebuilderimpl.go index 2504936930..591489e55d 100644 --- a/internal/checker/nodebuilderimpl.go +++ b/internal/checker/nodebuilderimpl.go @@ -93,6 +93,9 @@ type nodeBuilderImpl struct { // state ctx *NodeBuilderContext + + // reusable visitor + cloneBindingNameVisitor *ast.NodeVisitor } const ( @@ -102,9 +105,10 @@ const ( // Node builder utility functions -func newNodeBuilderImpl(ch *Checker, e *printer.EmitContext) nodeBuilderImpl { - result := nodeBuilderImpl{f: e.Factory.AsNodeFactory(), ch: ch, e: e} - return result +func newNodeBuilderImpl(ch *Checker, e *printer.EmitContext) *nodeBuilderImpl { + b := &nodeBuilderImpl{f: e.Factory.AsNodeFactory(), ch: ch, e: e} + b.cloneBindingNameVisitor = ast.NewNodeVisitor(b.cloneBindingName, b.f, ast.NodeVisitorHooks{}) + return b } func (b *nodeBuilderImpl) saveRestoreFlags() func() { @@ -1468,8 +1472,46 @@ func (b *nodeBuilderImpl) parameterToParameterDeclarationName(parameterSymbol *a if parameterDeclaration == nil || parameterDeclaration.Name() == nil { return b.f.NewIdentifier(parameterSymbol.Name) } - // !!! TODO - symbol tracking of computed names in cloned binding patterns, set singleline emit flags - return b.f.DeepCloneNode(parameterDeclaration.Name()) + + name := parameterDeclaration.Name() + switch name.Kind { + case ast.KindIdentifier: + cloned := b.f.DeepCloneNode(name) + b.e.SetEmitFlags(cloned, printer.EFNoAsciiEscaping) + return cloned + case ast.KindQualifiedName: + cloned := b.f.DeepCloneNode(name.AsQualifiedName().Right) + b.e.SetEmitFlags(cloned, printer.EFNoAsciiEscaping) + return cloned + default: + return b.cloneBindingName(name) + } +} + +func (b *nodeBuilderImpl) cloneBindingName(node *ast.Node) *ast.Node { + if ast.IsComputedPropertyName(node) && b.ch.isLateBindableName(node) { + b.trackComputedName(node.Expression(), b.ctx.enclosingDeclaration) + } + + visited := b.cloneBindingNameVisitor.VisitEachChild(node) + + if ast.IsBindingElement(visited) { + bindingElement := visited.AsBindingElement() + visited = b.f.UpdateBindingElement( + bindingElement, + bindingElement.DotDotDotToken, + bindingElement.PropertyName, + bindingElement.Name(), + nil, // remove initializer + ) + } + + if !ast.NodeIsSynthesized(visited) { + visited = b.f.DeepCloneNode(visited) + } + + b.e.SetEmitFlags(visited, printer.EFSingleLine|printer.EFNoAsciiEscaping) + return visited } func (b *nodeBuilderImpl) symbolTableToDeclarationStatements(symbolTable *ast.SymbolTable) []*ast.Node { diff --git a/internal/scanner/scanner.go b/internal/scanner/scanner.go index d691bc08e1..52abea06b4 100644 --- a/internal/scanner/scanner.go +++ b/internal/scanner/scanner.go @@ -2086,13 +2086,14 @@ func SkipTriviaEx(text string, pos int, options *SkipTriviaOptions) int { options = &SkipTriviaOptions{} } + textLen := len(text) canConsumeStar := false // Keep in sync with couldStartTrivia for { ch, size := utf8.DecodeRuneInString(text[pos:]) switch ch { case '\r': - if text[pos+1] == '\n' { + if pos+1 < textLen && text[pos+1] == '\n' { pos++ } fallthrough @@ -2110,10 +2111,10 @@ func SkipTriviaEx(text string, pos int, options *SkipTriviaOptions) int { if options.StopAtComments { break } - if pos+1 < len(text) { + if pos+1 < textLen { if text[pos+1] == '/' { pos += 2 - for pos < len(text) { + for pos < textLen { ch, size := utf8.DecodeRuneInString(text[pos:]) if stringutil.IsLineBreak(ch) { break @@ -2125,8 +2126,8 @@ func SkipTriviaEx(text string, pos int, options *SkipTriviaOptions) int { } if text[pos+1] == '*' { pos += 2 - for pos < len(text) { - if text[pos] == '*' && text[pos+1] == '/' { + for pos < textLen { + if text[pos] == '*' && (pos+1 < textLen) && text[pos+1] == '/' { pos += 2 break } diff --git a/testdata/baselines/reference/submodule/compiler/checkDestructuringShorthandAssigment.types b/testdata/baselines/reference/submodule/compiler/checkDestructuringShorthandAssigment.types index dd005798f2..081ac8e6fd 100644 --- a/testdata/baselines/reference/submodule/compiler/checkDestructuringShorthandAssigment.types +++ b/testdata/baselines/reference/submodule/compiler/checkDestructuringShorthandAssigment.types @@ -3,14 +3,14 @@ === bug25434.js === // should not crash while checking function Test({ b = '' } = {}) {} ->Test : ({ b = "" }?: { b?: string; }) => void +>Test : ({ b }?: { b?: string; }) => void >b : string >'' : "" >{} : {} Test(({ b = '5' } = {})); >Test(({ b = '5' } = {})) : void ->Test : ({ b = "" }?: { b?: string; }) => void +>Test : ({ b }?: { b?: string; }) => void >({ b = '5' } = {}) : {} >{ b = '5' } = {} : {} >{ b = '5' } : { b?: any; } diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypeForInitalizedVariablesFiltersUndefined.types b/testdata/baselines/reference/submodule/compiler/contextualTypeForInitalizedVariablesFiltersUndefined.types index 0dd07c1718..7dfb780b90 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTypeForInitalizedVariablesFiltersUndefined.types +++ b/testdata/baselines/reference/submodule/compiler/contextualTypeForInitalizedVariablesFiltersUndefined.types @@ -2,8 +2,8 @@ === contextualTypeForInitalizedVariablesFiltersUndefined.ts === const fInferred = ({ a = 0 } = {}) => a; ->fInferred : ({ a = 0 }?: { a?: number | undefined; }) => number ->({ a = 0 } = {}) => a : ({ a = 0 }?: { a?: number | undefined; }) => number +>fInferred : ({ a }?: { a?: number | undefined; }) => number +>({ a = 0 } = {}) => a : ({ a }?: { a?: number | undefined; }) => number >a : number >0 : 0 >{} : {} @@ -12,9 +12,9 @@ const fInferred = ({ a = 0 } = {}) => a; // const fInferred: ({ a }?: { a?: number; }) => number const fAnnotated: typeof fInferred = ({ a = 0 } = {}) => a; ->fAnnotated : ({ a = 0 }?: { a?: number | undefined; }) => number ->fInferred : ({ a = 0 }?: { a?: number | undefined; }) => number ->({ a = 0 } = {}) => a : ({ a = 0 }?: { a?: number | undefined; } | undefined) => number +>fAnnotated : ({ a }?: { a?: number | undefined; }) => number +>fInferred : ({ a }?: { a?: number | undefined; }) => number +>({ a = 0 } = {}) => a : ({ a }?: { a?: number | undefined; } | undefined) => number >a : number >0 : 0 >{} : {} diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypeForInitalizedVariablesFiltersUndefined.types.diff b/testdata/baselines/reference/submodule/compiler/contextualTypeForInitalizedVariablesFiltersUndefined.types.diff deleted file mode 100644 index e1a2d49ff9..0000000000 --- a/testdata/baselines/reference/submodule/compiler/contextualTypeForInitalizedVariablesFiltersUndefined.types.diff +++ /dev/null @@ -1,26 +0,0 @@ ---- old.contextualTypeForInitalizedVariablesFiltersUndefined.types -+++ new.contextualTypeForInitalizedVariablesFiltersUndefined.types -@@= skipped -1, +1 lines =@@ - - === contextualTypeForInitalizedVariablesFiltersUndefined.ts === - const fInferred = ({ a = 0 } = {}) => a; -->fInferred : ({ a }?: { a?: number | undefined; }) => number -->({ a = 0 } = {}) => a : ({ a }?: { a?: number | undefined; }) => number -+>fInferred : ({ a = 0 }?: { a?: number | undefined; }) => number -+>({ a = 0 } = {}) => a : ({ a = 0 }?: { a?: number | undefined; }) => number - >a : number - >0 : 0 - >{} : {} -@@= skipped -10, +10 lines =@@ - // const fInferred: ({ a }?: { a?: number; }) => number - - const fAnnotated: typeof fInferred = ({ a = 0 } = {}) => a; -->fAnnotated : ({ a }?: { a?: number | undefined; }) => number -->fInferred : ({ a }?: { a?: number | undefined; }) => number -->({ a = 0 } = {}) => a : ({ a }?: { a?: number | undefined; } | undefined) => number -+>fAnnotated : ({ a = 0 }?: { a?: number | undefined; }) => number -+>fInferred : ({ a = 0 }?: { a?: number | undefined; }) => number -+>({ a = 0 } = {}) => a : ({ a = 0 }?: { a?: number | undefined; } | undefined) => number - >a : number - >0 : 0 - >{} : {} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextuallyTypedParametersWithInitializers1.types b/testdata/baselines/reference/submodule/compiler/contextuallyTypedParametersWithInitializers1.types index 24a4eb844e..3de48cad91 100644 --- a/testdata/baselines/reference/submodule/compiler/contextuallyTypedParametersWithInitializers1.types +++ b/testdata/baselines/reference/submodule/compiler/contextuallyTypedParametersWithInitializers1.types @@ -28,44 +28,44 @@ declare function id5 any>(input: T): T; >input : T const f10 = function ({ foo = 42 }) { return foo }; ->f10 : ({ foo = 42 }: { foo?: number | undefined; }) => number ->function ({ foo = 42 }) { return foo } : ({ foo = 42 }: { foo?: number | undefined; }) => number +>f10 : ({ foo }: { foo?: number | undefined; }) => number +>function ({ foo = 42 }) { return foo } : ({ foo }: { foo?: number | undefined; }) => number >foo : number >42 : 42 >foo : number const f11 = id1(function ({ foo = 42 }) { return foo }); ->f11 : ({ foo = 42 }: { foo?: number | undefined; }) => number ->id1(function ({ foo = 42 }) { return foo }) : ({ foo = 42 }: { foo?: number | undefined; }) => number +>f11 : ({ foo }: { foo?: number | undefined; }) => number +>id1(function ({ foo = 42 }) { return foo }) : ({ foo }: { foo?: number | undefined; }) => number >id1 : (input: T) => T ->function ({ foo = 42 }) { return foo } : ({ foo = 42 }: { foo?: number | undefined; }) => number +>function ({ foo = 42 }) { return foo } : ({ foo }: { foo?: number | undefined; }) => number >foo : number >42 : 42 >foo : number const f12 = id2(function ({ foo = 42 }) { return foo }); ->f12 : ({ foo = 42 }: any) => any ->id2(function ({ foo = 42 }) { return foo }) : ({ foo = 42 }: any) => any +>f12 : ({ foo }: any) => any +>id2(function ({ foo = 42 }) { return foo }) : ({ foo }: any) => any >id2 : any>(input: T) => T ->function ({ foo = 42 }) { return foo } : ({ foo = 42 }: any) => any +>function ({ foo = 42 }) { return foo } : ({ foo }: any) => any >foo : any >42 : 42 >foo : any const f13 = id3(function ({ foo = 42 }) { return foo }); ->f13 : ({ foo = 42 }: { foo: any; }) => any ->id3(function ({ foo = 42 }) { return foo }) : ({ foo = 42 }: { foo: any; }) => any +>f13 : ({ foo }: { foo: any; }) => any +>id3(function ({ foo = 42 }) { return foo }) : ({ foo }: { foo: any; }) => any >id3 : any>(input: T) => T ->function ({ foo = 42 }) { return foo } : ({ foo = 42 }: { foo: any; }) => any +>function ({ foo = 42 }) { return foo } : ({ foo }: { foo: any; }) => any >foo : any >42 : 42 >foo : any const f14 = id4(function ({ foo = 42 }) { return foo }); ->f14 : ({ foo = 42 }: { foo?: number | undefined; }) => number ->id4(function ({ foo = 42 }) { return foo }) : ({ foo = 42 }: { foo?: number | undefined; }) => number +>f14 : ({ foo }: { foo?: number | undefined; }) => number +>id4(function ({ foo = 42 }) { return foo }) : ({ foo }: { foo?: number | undefined; }) => number >id4 : any>(input: T) => T ->function ({ foo = 42 }) { return foo } : ({ foo = 42 }: { foo?: number | undefined; }) => number +>function ({ foo = 42 }) { return foo } : ({ foo }: { foo?: number | undefined; }) => number >foo : number >42 : 42 >foo : number @@ -254,7 +254,7 @@ function id(input: T): T { return input } >input : T function getFoo ({ foo = 42 }) { ->getFoo : ({ foo = 42 }: { foo?: number | undefined; }) => number +>getFoo : ({ foo }: { foo?: number | undefined; }) => number >foo : number >42 : 42 @@ -263,17 +263,17 @@ function getFoo ({ foo = 42 }) { } const newGetFoo = id(getFoo); ->newGetFoo : ({ foo = 42 }: { foo?: number | undefined; }) => number ->id(getFoo) : ({ foo = 42 }: { foo?: number | undefined; }) => number +>newGetFoo : ({ foo }: { foo?: number | undefined; }) => number +>id(getFoo) : ({ foo }: { foo?: number | undefined; }) => number >id : (input: T) => T ->getFoo : ({ foo = 42 }: { foo?: number | undefined; }) => number +>getFoo : ({ foo }: { foo?: number | undefined; }) => number const newGetFoo2 = id(function getFoo ({ foo = 42 }) { ->newGetFoo2 : ({ foo = 42 }: { foo?: number | undefined; }) => number ->id(function getFoo ({ foo = 42 }) { return foo;}) : ({ foo = 42 }: { foo?: number | undefined; }) => number +>newGetFoo2 : ({ foo }: { foo?: number | undefined; }) => number +>id(function getFoo ({ foo = 42 }) { return foo;}) : ({ foo }: { foo?: number | undefined; }) => number >id : (input: T) => T ->function getFoo ({ foo = 42 }) { return foo;} : ({ foo = 42 }: { foo?: number | undefined; }) => number ->getFoo : ({ foo = 42 }: { foo?: number | undefined; }) => number +>function getFoo ({ foo = 42 }) { return foo;} : ({ foo }: { foo?: number | undefined; }) => number +>getFoo : ({ foo }: { foo?: number | undefined; }) => number >foo : number >42 : 42 diff --git a/testdata/baselines/reference/submodule/compiler/contextuallyTypedParametersWithInitializers1.types.diff b/testdata/baselines/reference/submodule/compiler/contextuallyTypedParametersWithInitializers1.types.diff index 32ac780ace..0fe68a52d0 100644 --- a/testdata/baselines/reference/submodule/compiler/contextuallyTypedParametersWithInitializers1.types.diff +++ b/testdata/baselines/reference/submodule/compiler/contextuallyTypedParametersWithInitializers1.types.diff @@ -17,49 +17,7 @@ >x : number | undefined >input : T - const f10 = function ({ foo = 42 }) { return foo }; -->f10 : ({ foo }: { foo?: number | undefined; }) => number -->function ({ foo = 42 }) { return foo } : ({ foo }: { foo?: number | undefined; }) => number -+>f10 : ({ foo = 42 }: { foo?: number | undefined; }) => number -+>function ({ foo = 42 }) { return foo } : ({ foo = 42 }: { foo?: number | undefined; }) => number - >foo : number - >42 : 42 - >foo : number - - const f11 = id1(function ({ foo = 42 }) { return foo }); -->f11 : ({ foo }: { foo?: number | undefined; }) => number -->id1(function ({ foo = 42 }) { return foo }) : ({ foo }: { foo?: number | undefined; }) => number -+>f11 : ({ foo = 42 }: { foo?: number | undefined; }) => number -+>id1(function ({ foo = 42 }) { return foo }) : ({ foo = 42 }: { foo?: number | undefined; }) => number - >id1 : (input: T) => T -->function ({ foo = 42 }) { return foo } : ({ foo }: { foo?: number | undefined; }) => number -+>function ({ foo = 42 }) { return foo } : ({ foo = 42 }: { foo?: number | undefined; }) => number - >foo : number - >42 : 42 - >foo : number - - const f12 = id2(function ({ foo = 42 }) { return foo }); -->f12 : ({ foo }: any) => any -->id2(function ({ foo = 42 }) { return foo }) : ({ foo }: any) => any -+>f12 : ({ foo = 42 }: any) => any -+>id2(function ({ foo = 42 }) { return foo }) : ({ foo = 42 }: any) => any - >id2 : any>(input: T) => T -->function ({ foo = 42 }) { return foo } : ({ foo }: any) => any -+>function ({ foo = 42 }) { return foo } : ({ foo = 42 }: any) => any - >foo : any - >42 : 42 - >foo : any - - const f13 = id3(function ({ foo = 42 }) { return foo }); -->f13 : ({ foo }: { foo: any; }) => any -->id3(function ({ foo = 42 }) { return foo }) : ({ foo }: { foo: any; }) => any -+>f13 : ({ foo = 42 }: { foo: any; }) => any -+>id3(function ({ foo = 42 }) { return foo }) : ({ foo = 42 }: { foo: any; }) => any - >id3 : any>(input: T) => T -->function ({ foo = 42 }) { return foo } : ({ foo }: { foo: any; }) => any -+>function ({ foo = 42 }) { return foo } : ({ foo = 42 }: { foo: any; }) => any - >foo : any - >42 : 42 +@@= skipped -45, +45 lines =@@ >foo : any const f14 = id4(function ({ foo = 42 }) { return foo }); @@ -67,14 +25,14 @@ ->id4(function ({ foo = 42 }) { return foo }) : ({ foo }: { foo?: number; }) => number ->id4 : any>(input: T) => T ->function ({ foo = 42 }) { return foo } : ({ foo }: { foo?: number; }) => number -+>f14 : ({ foo = 42 }: { foo?: number | undefined; }) => number -+>id4(function ({ foo = 42 }) { return foo }) : ({ foo = 42 }: { foo?: number | undefined; }) => number ++>f14 : ({ foo }: { foo?: number | undefined; }) => number ++>id4(function ({ foo = 42 }) { return foo }) : ({ foo }: { foo?: number | undefined; }) => number +>id4 : any>(input: T) => T -+>function ({ foo = 42 }) { return foo } : ({ foo = 42 }: { foo?: number | undefined; }) => number ++>function ({ foo = 42 }) { return foo } : ({ foo }: { foo?: number | undefined; }) => number >foo : number >42 : 42 >foo : number -@@= skipped -81, +81 lines =@@ +@@= skipped -36, +36 lines =@@ const f25 = id5(function (foo = 42) { return foo }); >f25 : (foo?: number | undefined) => number >id5(function (foo = 42) { return foo }) : (foo?: number | undefined) => number @@ -82,37 +40,4 @@ +>id5 : any>(input: T) => T >function (foo = 42) { return foo } : (foo?: number | undefined) => number >foo : number | undefined - >42 : 42 -@@= skipped -156, +156 lines =@@ - >input : T - - function getFoo ({ foo = 42 }) { -->getFoo : ({ foo }: { foo?: number | undefined; }) => number -+>getFoo : ({ foo = 42 }: { foo?: number | undefined; }) => number - >foo : number - >42 : 42 - -@@= skipped -9, +9 lines =@@ - } - - const newGetFoo = id(getFoo); -->newGetFoo : ({ foo }: { foo?: number | undefined; }) => number -->id(getFoo) : ({ foo }: { foo?: number | undefined; }) => number -+>newGetFoo : ({ foo = 42 }: { foo?: number | undefined; }) => number -+>id(getFoo) : ({ foo = 42 }: { foo?: number | undefined; }) => number - >id : (input: T) => T -->getFoo : ({ foo }: { foo?: number | undefined; }) => number -+>getFoo : ({ foo = 42 }: { foo?: number | undefined; }) => number - - const newGetFoo2 = id(function getFoo ({ foo = 42 }) { -->newGetFoo2 : ({ foo }: { foo?: number | undefined; }) => number -->id(function getFoo ({ foo = 42 }) { return foo;}) : ({ foo }: { foo?: number | undefined; }) => number -+>newGetFoo2 : ({ foo = 42 }: { foo?: number | undefined; }) => number -+>id(function getFoo ({ foo = 42 }) { return foo;}) : ({ foo = 42 }: { foo?: number | undefined; }) => number - >id : (input: T) => T -->function getFoo ({ foo = 42 }) { return foo;} : ({ foo }: { foo?: number | undefined; }) => number -->getFoo : ({ foo }: { foo?: number | undefined; }) => number -+>function getFoo ({ foo = 42 }) { return foo;} : ({ foo = 42 }: { foo?: number | undefined; }) => number -+>getFoo : ({ foo = 42 }: { foo?: number | undefined; }) => number - >foo : number - >42 : 42 + >42 : 42 \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/correlatedUnions.types b/testdata/baselines/reference/submodule/compiler/correlatedUnions.types index 374c9cd71c..41a398fd7f 100644 --- a/testdata/baselines/reference/submodule/compiler/correlatedUnions.types +++ b/testdata/baselines/reference/submodule/compiler/correlatedUnions.types @@ -376,7 +376,7 @@ function processEvents(events: Ev[]) { } function createEventListener({ name, once = false, callback }: Ev): Ev { ->createEventListener : ({ name, once = false, callback }: Ev) => Ev +>createEventListener : ({ name, once, callback }: Ev) => Ev >name : K >once : boolean >false : false @@ -392,7 +392,7 @@ function createEventListener({ name, once = fa const clickEvent = createEventListener({ >clickEvent : { readonly name: "click"; readonly once?: boolean | undefined; readonly callback: (ev: MouseEvent) => void; } >createEventListener({ name: "click", callback: ev => console.log(ev),}) : { readonly name: "click"; readonly once?: boolean | undefined; readonly callback: (ev: MouseEvent) => void; } ->createEventListener : ({ name, once = false, callback }: Ev) => Ev +>createEventListener : ({ name, once, callback }: Ev) => Ev >{ name: "click", callback: ev => console.log(ev),} : { name: "click"; callback: (ev: MouseEvent) => void; } name: "click", @@ -414,7 +414,7 @@ const clickEvent = createEventListener({ const scrollEvent = createEventListener({ >scrollEvent : { readonly name: "scroll"; readonly once?: boolean | undefined; readonly callback: (ev: Event) => void; } >createEventListener({ name: "scroll", callback: ev => console.log(ev),}) : { readonly name: "scroll"; readonly once?: boolean | undefined; readonly callback: (ev: Event) => void; } ->createEventListener : ({ name, once = false, callback }: Ev) => Ev +>createEventListener : ({ name, once, callback }: Ev) => Ev >{ name: "scroll", callback: ev => console.log(ev),} : { name: "scroll"; callback: (ev: Event) => void; } name: "scroll", diff --git a/testdata/baselines/reference/submodule/compiler/correlatedUnions.types.diff b/testdata/baselines/reference/submodule/compiler/correlatedUnions.types.diff index f99ed9cecd..1e94053bb7 100644 --- a/testdata/baselines/reference/submodule/compiler/correlatedUnions.types.diff +++ b/testdata/baselines/reference/submodule/compiler/correlatedUnions.types.diff @@ -60,41 +60,28 @@ >event.name : K >event : Ev >name : K -@@= skipped -22, +22 lines =@@ - } - - function createEventListener({ name, once = false, callback }: Ev): Ev { -->createEventListener : ({ name, once, callback }: Ev) => Ev -+>createEventListener : ({ name, once = false, callback }: Ev) => Ev - >name : K - >once : boolean - >false : false -@@= skipped -14, +14 lines =@@ +@@= skipped -36, +36 lines =@@ } const clickEvent = createEventListener({ ->clickEvent : { readonly name: "click"; readonly once?: boolean; readonly callback: (ev: MouseEvent) => void; } ->createEventListener({ name: "click", callback: ev => console.log(ev),}) : { readonly name: "click"; readonly once?: boolean; readonly callback: (ev: MouseEvent) => void; } -->createEventListener : ({ name, once, callback }: Ev) => Ev +>clickEvent : { readonly name: "click"; readonly once?: boolean | undefined; readonly callback: (ev: MouseEvent) => void; } +>createEventListener({ name: "click", callback: ev => console.log(ev),}) : { readonly name: "click"; readonly once?: boolean | undefined; readonly callback: (ev: MouseEvent) => void; } -+>createEventListener : ({ name, once = false, callback }: Ev) => Ev + >createEventListener : ({ name, once, callback }: Ev) => Ev >{ name: "click", callback: ev => console.log(ev),} : { name: "click"; callback: (ev: MouseEvent) => void; } - name: "click", @@= skipped -22, +22 lines =@@ }); const scrollEvent = createEventListener({ ->scrollEvent : { readonly name: "scroll"; readonly once?: boolean; readonly callback: (ev: Event) => void; } ->createEventListener({ name: "scroll", callback: ev => console.log(ev),}) : { readonly name: "scroll"; readonly once?: boolean; readonly callback: (ev: Event) => void; } -->createEventListener : ({ name, once, callback }: Ev) => Ev +>scrollEvent : { readonly name: "scroll"; readonly once?: boolean | undefined; readonly callback: (ev: Event) => void; } +>createEventListener({ name: "scroll", callback: ev => console.log(ev),}) : { readonly name: "scroll"; readonly once?: boolean | undefined; readonly callback: (ev: Event) => void; } -+>createEventListener : ({ name, once = false, callback }: Ev) => Ev + >createEventListener : ({ name, once, callback }: Ev) => Ev >{ name: "scroll", callback: ev => console.log(ev),} : { name: "scroll"; callback: (ev: Event) => void; } - name: "scroll", @@= skipped -24, +24 lines =@@ processEvents([clickEvent, scrollEvent]); >processEvents([clickEvent, scrollEvent]) : void diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatternWithReservedWord.js b/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatternWithReservedWord.js index e221870504..6f3b99f6c9 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatternWithReservedWord.js +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatternWithReservedWord.js @@ -45,5 +45,5 @@ export interface GetLocalesOptions { config?: LocaleConfig | undefined; name?: string; } -export declare const getLocales: ({ app, name, default: defaultLocalesConfig, config: userLocalesConfig = {}, }: GetLocalesOptions) => ConvertLocaleConfig; +export declare const getLocales: ({ app, name, default: defaultLocalesConfig, config: userLocalesConfig, }: GetLocalesOptions) => ConvertLocaleConfig; export {}; diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatternWithReservedWord.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatternWithReservedWord.js.diff index e1b79c94e1..cf293bad19 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatternWithReservedWord.js.diff +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatternWithReservedWord.js.diff @@ -9,11 +9,4 @@ +const getLocales = ({ app, name, default: defaultLocalesConfig, config: userLocalesConfig = {}, }) => { return defaultLocalesConfig; }; - exports.getLocales = getLocales; -@@= skipped -17, +16 lines =@@ - config?: LocaleConfig | undefined; - name?: string; - } --export declare const getLocales: ({ app, name, default: defaultLocalesConfig, config: userLocalesConfig, }: GetLocalesOptions) => ConvertLocaleConfig; -+export declare const getLocales: ({ app, name, default: defaultLocalesConfig, config: userLocalesConfig = {}, }: GetLocalesOptions) => ConvertLocaleConfig; - export {}; \ No newline at end of file + exports.getLocales = getLocales; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatternWithReservedWord.types b/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatternWithReservedWord.types index 09b6af107a..839417b58d 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatternWithReservedWord.types +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatternWithReservedWord.types @@ -28,8 +28,8 @@ export interface GetLocalesOptions { } export const getLocales = ({ ->getLocales : ({ app, name, default: defaultLocalesConfig, config: userLocalesConfig = {}, }: GetLocalesOptions) => ConvertLocaleConfig ->({ app, name, default: defaultLocalesConfig, config: userLocalesConfig = {},}: GetLocalesOptions): ConvertLocaleConfig => { return defaultLocalesConfig;} : ({ app, name, default: defaultLocalesConfig, config: userLocalesConfig = {}, }: GetLocalesOptions) => ConvertLocaleConfig +>getLocales : ({ app, name, default: defaultLocalesConfig, config: userLocalesConfig, }: GetLocalesOptions) => ConvertLocaleConfig +>({ app, name, default: defaultLocalesConfig, config: userLocalesConfig = {},}: GetLocalesOptions): ConvertLocaleConfig => { return defaultLocalesConfig;} : ({ app, name, default: defaultLocalesConfig, config: userLocalesConfig, }: GetLocalesOptions) => ConvertLocaleConfig app, >app : unknown diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatternWithReservedWord.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatternWithReservedWord.types.diff deleted file mode 100644 index 2787d20118..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatternWithReservedWord.types.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- old.declarationEmitBindingPatternWithReservedWord.types -+++ new.declarationEmitBindingPatternWithReservedWord.types -@@= skipped -27, +27 lines =@@ - } - - export const getLocales = ({ -->getLocales : ({ app, name, default: defaultLocalesConfig, config: userLocalesConfig, }: GetLocalesOptions) => ConvertLocaleConfig -->({ app, name, default: defaultLocalesConfig, config: userLocalesConfig = {},}: GetLocalesOptions): ConvertLocaleConfig => { return defaultLocalesConfig;} : ({ app, name, default: defaultLocalesConfig, config: userLocalesConfig, }: GetLocalesOptions) => ConvertLocaleConfig -+>getLocales : ({ app, name, default: defaultLocalesConfig, config: userLocalesConfig = {}, }: GetLocalesOptions) => ConvertLocaleConfig -+>({ app, name, default: defaultLocalesConfig, config: userLocalesConfig = {},}: GetLocalesOptions): ConvertLocaleConfig => { return defaultLocalesConfig;} : ({ app, name, default: defaultLocalesConfig, config: userLocalesConfig = {}, }: GetLocalesOptions) => ConvertLocaleConfig - - app, - >app : unknown \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatterns.js b/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatterns.js index 4b563121c1..5a421f7ccf 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatterns.js +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatterns.js @@ -15,7 +15,7 @@ function f({} = a, [] = a, { p: {} = a } = a) { //// [declarationEmitBindingPatterns.d.ts] -declare const k: ({ x: z = "y" }: { +declare const k: ({ x: z }: { x?: string; }) => void; declare var a: any; diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatterns.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatterns.js.diff index 7d4a4b3ba1..0d2fca96bd 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatterns.js.diff +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatterns.js.diff @@ -16,10 +16,3 @@ +function f({} = a, [] = a, { p: {} = a } = a) { } - - //// [declarationEmitBindingPatterns.d.ts] --declare const k: ({ x: z }: { -+declare const k: ({ x: z = "y" }: { - x?: string; - }) => void; - declare var a: any; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatterns.types b/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatterns.types index d6536ad65e..892e75b664 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatterns.types +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatterns.types @@ -2,8 +2,8 @@ === declarationEmitBindingPatterns.ts === const k = ({x: z = 'y'}) => { } ->k : ({ x: z = "y" }: { x?: string; }) => void ->({x: z = 'y'}) => { } : ({ x: z = "y" }: { x?: string; }) => void +>k : ({ x: z }: { x?: string; }) => void +>({x: z = 'y'}) => { } : ({ x: z }: { x?: string; }) => void >x : any >z : string >'y' : "y" @@ -12,7 +12,7 @@ var a; >a : any function f({} = a, [] = a, { p: {} = a} = a) { ->f : ({}?: any, []?: any, { p: {} = a }?: any) => void +>f : ({}?: any, []?: any, { p: {} }?: any) => void >a : any >a : any >p : any diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatterns.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatterns.types.diff deleted file mode 100644 index 700cd5aba0..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatterns.types.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.declarationEmitBindingPatterns.types -+++ new.declarationEmitBindingPatterns.types -@@= skipped -1, +1 lines =@@ - - === declarationEmitBindingPatterns.ts === - const k = ({x: z = 'y'}) => { } -->k : ({ x: z }: { x?: string; }) => void -->({x: z = 'y'}) => { } : ({ x: z }: { x?: string; }) => void -+>k : ({ x: z = "y" }: { x?: string; }) => void -+>({x: z = 'y'}) => { } : ({ x: z = "y" }: { x?: string; }) => void - >x : any - >z : string - >'y' : "y" -@@= skipped -10, +10 lines =@@ - >a : any - - function f({} = a, [] = a, { p: {} = a} = a) { -->f : ({}?: any, []?: any, { p: {} }?: any) => void -+>f : ({}?: any, []?: any, { p: {} = a }?: any) => void - >a : any - >a : any - >p : any \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameCausesImportToBePainted.js b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameCausesImportToBePainted.js index 18fd46eb05..a14e0ddae3 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameCausesImportToBePainted.js +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameCausesImportToBePainted.js @@ -37,6 +37,6 @@ export interface Context { [Key]: string; } //// [index.d.ts] -import { Context } from "./context"; +import { Key, Context } from "./context"; export declare const context: Context; export declare const withContext: ({ [Key]: value }: Context) => string; diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameCausesImportToBePainted.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameCausesImportToBePainted.js.diff index 88ed844349..2a4cebe4b8 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameCausesImportToBePainted.js.diff +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameCausesImportToBePainted.js.diff @@ -21,12 +21,3 @@ +const withContext = ({ [context_1.Key]: value }) => value; exports.withContext = withContext; - -@@= skipped -20, +16 lines =@@ - [Key]: string; - } - //// [index.d.ts] --import { Key, Context } from "./context"; -+import { Context } from "./context"; - export declare const context: Context; - export declare const withContext: ({ [Key]: value }: Context) => string; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring2.types b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring2.types index 06ebc172fd..94bca64192 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring2.types +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring2.types @@ -2,7 +2,7 @@ === declarationEmitDestructuring2.ts === function f({x = 10, y: [a, b, c, d] = [1, 2, 3, 4]} = { x: 10, y: [2, 4, 6, 8] }) { } ->f : ({ x = 10, y: [a, b, c, d] = [1, 2, 3, 4] }?: { x?: number; y?: [number, number, number, number]; }) => void +>f : ({ x, y: [a, b, c, d] }?: { x?: number; y?: [number, number, number, number]; }) => void >x : number >10 : 10 >y : any @@ -38,7 +38,7 @@ function g([a, b, c, d] = [1, 2, 3, 4]) { } >4 : 4 function h([a, [b], [[c]], {x = 10, y: [a, b, c], z: {a1, b1}}]){ } ->h : ([a, [b], [[c]], { x = 10, y: [a, b, c], z: { a1, b1 } }]: [any, [any], [[any]], { x?: number; y: [any, any, any]; z: { a1: any; b1: any; }; }]) => void +>h : ([a, [b], [[c]], { x, y: [a, b, c], z: { a1, b1 } }]: [any, [any], [[any]], { x?: number; y: [any, any, any]; z: { a1: any; b1: any; }; }]) => void >a : any >b : any >c : any @@ -53,7 +53,7 @@ function h([a, [b], [[c]], {x = 10, y: [a, b, c], z: {a1, b1}}]){ } >b1 : any function h1([a, [b], [[c]], {x = 10, y = [1, 2, 3], z: {a1, b1}}]){ } ->h1 : ([a, [b], [[c]], { x = 10, y = [1, 2, 3], z: { a1, b1 } }]: [any, [any], [[any]], { x?: number; y?: number[]; z: { a1: any; b1: any; }; }]) => void +>h1 : ([a, [b], [[c]], { x, y, z: { a1, b1 } }]: [any, [any], [[any]], { x?: number; y?: number[]; z: { a1: any; b1: any; }; }]) => void >a : any >b : any >c : any diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring2.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring2.types.diff deleted file mode 100644 index d9016bbe1c..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring2.types.diff +++ /dev/null @@ -1,29 +0,0 @@ ---- old.declarationEmitDestructuring2.types -+++ new.declarationEmitDestructuring2.types -@@= skipped -1, +1 lines =@@ - - === declarationEmitDestructuring2.ts === - function f({x = 10, y: [a, b, c, d] = [1, 2, 3, 4]} = { x: 10, y: [2, 4, 6, 8] }) { } -->f : ({ x, y: [a, b, c, d] }?: { x?: number; y?: [number, number, number, number]; }) => void -+>f : ({ x = 10, y: [a, b, c, d] = [1, 2, 3, 4] }?: { x?: number; y?: [number, number, number, number]; }) => void - >x : number - >10 : 10 - >y : any -@@= skipped -36, +36 lines =@@ - >4 : 4 - - function h([a, [b], [[c]], {x = 10, y: [a, b, c], z: {a1, b1}}]){ } -->h : ([a, [b], [[c]], { x, y: [a, b, c], z: { a1, b1 } }]: [any, [any], [[any]], { x?: number; y: [any, any, any]; z: { a1: any; b1: any; }; }]) => void -+>h : ([a, [b], [[c]], { x = 10, y: [a, b, c], z: { a1, b1 } }]: [any, [any], [[any]], { x?: number; y: [any, any, any]; z: { a1: any; b1: any; }; }]) => void - >a : any - >b : any - >c : any -@@= skipped -15, +15 lines =@@ - >b1 : any - - function h1([a, [b], [[c]], {x = 10, y = [1, 2, 3], z: {a1, b1}}]){ } -->h1 : ([a, [b], [[c]], { x, y, z: { a1, b1 } }]: [any, [any], [[any]], { x?: number; y?: number[]; z: { a1: any; b1: any; }; }]) => void -+>h1 : ([a, [b], [[c]], { x = 10, y = [1, 2, 3], z: { a1, b1 } }]: [any, [any], [[any]], { x?: number; y?: number[]; z: { a1: any; b1: any; }; }]) => void - >a : any - >b : any - >c : any \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/destructuringInitializerContextualTypeFromContext.types b/testdata/baselines/reference/submodule/compiler/destructuringInitializerContextualTypeFromContext.types index 73798b4fe9..96b43c1e40 100644 --- a/testdata/baselines/reference/submodule/compiler/destructuringInitializerContextualTypeFromContext.types +++ b/testdata/baselines/reference/submodule/compiler/destructuringInitializerContextualTypeFromContext.types @@ -14,7 +14,7 @@ interface Props { const Parent: SFC = ({ >Parent : SFC ->({ children, name = "Artemis", ...props}) => Child({name, ...props}) : ({ children, name = "Artemis", ...props }: Props & { children?: any; }) => any +>({ children, name = "Artemis", ...props}) => Child({name, ...props}) : ({ children, name, ...props }: Props & { children?: any; }) => any children, >children : any @@ -35,7 +35,7 @@ const Parent: SFC = ({ const Child: SFC = ({ >Child : SFC ->({ children, name = "Artemis", ...props}) => `name: ${name} props: ${JSON.stringify(props)}` : ({ children, name = "Artemis", ...props }: Props & { children?: any; }) => string +>({ children, name = "Artemis", ...props}) => `name: ${name} props: ${JSON.stringify(props)}` : ({ children, name, ...props }: Props & { children?: any; }) => string children, >children : any @@ -66,7 +66,7 @@ declare function f(g: (as: string[]) => void): void f(([_1, _2 = undefined]) => undefined) >f(([_1, _2 = undefined]) => undefined) : void >f : (g: (as: string[]) => void) => void ->([_1, _2 = undefined]) => undefined : ([_1, _2 = undefined]: string[]) => undefined +>([_1, _2 = undefined]) => undefined : ([_1, _2]: string[]) => undefined >_1 : string >_2 : string | undefined >undefined : undefined diff --git a/testdata/baselines/reference/submodule/compiler/destructuringInitializerContextualTypeFromContext.types.diff b/testdata/baselines/reference/submodule/compiler/destructuringInitializerContextualTypeFromContext.types.diff index c403ad2879..c962a7bc28 100644 --- a/testdata/baselines/reference/submodule/compiler/destructuringInitializerContextualTypeFromContext.types.diff +++ b/testdata/baselines/reference/submodule/compiler/destructuringInitializerContextualTypeFromContext.types.diff @@ -1,24 +1,6 @@ --- old.destructuringInitializerContextualTypeFromContext.types +++ new.destructuringInitializerContextualTypeFromContext.types -@@= skipped -13, +13 lines =@@ - - const Parent: SFC = ({ - >Parent : SFC -->({ children, name = "Artemis", ...props}) => Child({name, ...props}) : ({ children, name, ...props }: Props & { children?: any; }) => any -+>({ children, name = "Artemis", ...props}) => Child({name, ...props}) : ({ children, name = "Artemis", ...props }: Props & { children?: any; }) => any - - children, - >children : any -@@= skipped -21, +21 lines =@@ - - const Child: SFC = ({ - >Child : SFC -->({ children, name = "Artemis", ...props}) => `name: ${name} props: ${JSON.stringify(props)}` : ({ children, name, ...props }: Props & { children?: any; }) => string -+>({ children, name = "Artemis", ...props}) => `name: ${name} props: ${JSON.stringify(props)}` : ({ children, name = "Artemis", ...props }: Props & { children?: any; }) => string - - children, - >children : any -@@= skipped -16, +16 lines =@@ +@@= skipped -50, +50 lines =@@ >`name: ${name} props: ${JSON.stringify(props)}` : string >name : "Apollo" | "Artemis" | "Dionysus" | "Persephone" >JSON.stringify(props) : string @@ -29,13 +11,4 @@ +>stringify : { (value: any, replacer?: ((this: any, key: string, value: any) => any) | undefined, space?: string | number | undefined): string; (value: any, replacer?: (string | number)[] | null | undefined, space?: string | number | undefined): string; } >props : {} - // Repro from #29189 -@@= skipped -15, +15 lines =@@ - f(([_1, _2 = undefined]) => undefined) - >f(([_1, _2 = undefined]) => undefined) : void - >f : (g: (as: string[]) => void) => void -->([_1, _2 = undefined]) => undefined : ([_1, _2]: string[]) => undefined -+>([_1, _2 = undefined]) => undefined : ([_1, _2 = undefined]: string[]) => undefined - >_1 : string - >_2 : string | undefined - >undefined : undefined \ No newline at end of file + // Repro from #29189 \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedNameNegative1.types b/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedNameNegative1.types index 5832cf454a..b0af82125f 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedNameNegative1.types +++ b/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedNameNegative1.types @@ -33,7 +33,7 @@ function bar(props: { x?: string; y?: string }) { } function foo({ x = "", y = "" }: { x?: string; y?: string }) { ->foo : ({ x = "", y = "" }: { x?: string | undefined; y?: string | undefined; }) => { [x: string]: number; } +>foo : ({ x, y }: { x?: string | undefined; y?: string | undefined; }) => { [x: string]: number; } >x : string >"" : "" >y : string diff --git a/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedNameNegative1.types.diff b/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedNameNegative1.types.diff index 5118d0fd4b..99150dfb97 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedNameNegative1.types.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedNameNegative1.types.diff @@ -25,7 +25,7 @@ function foo({ x = "", y = "" }: { x?: string; y?: string }) { ->foo : ({ x, y }: { x?: string; y?: string; }) => { [x]: number; [y]: number; } -+>foo : ({ x = "", y = "" }: { x?: string | undefined; y?: string | undefined; }) => { [x: string]: number; } ++>foo : ({ x, y }: { x?: string | undefined; y?: string | undefined; }) => { [x: string]: number; } >x : string >"" : "" >y : string diff --git a/testdata/baselines/reference/submodule/compiler/expressionsForbiddenInParameterInitializers.types b/testdata/baselines/reference/submodule/compiler/expressionsForbiddenInParameterInitializers.types index 0ede4afca3..82dd05c902 100644 --- a/testdata/baselines/reference/submodule/compiler/expressionsForbiddenInParameterInitializers.types +++ b/testdata/baselines/reference/submodule/compiler/expressionsForbiddenInParameterInitializers.types @@ -2,7 +2,7 @@ === bar.ts === export async function foo({ foo = await import("./bar") }) { ->foo : ({ foo = await import("./bar") }: { foo?: typeof import("./bar"); }) => Promise +>foo : ({ foo }: { foo?: typeof import("./bar"); }) => Promise >foo : typeof import("./bar") >await import("./bar") : typeof import("./bar") >import("./bar") : Promise @@ -10,7 +10,7 @@ export async function foo({ foo = await import("./bar") }) { } export function* foo2({ foo = yield "a" }) { ->foo2 : ({ foo = yield "a" }: { foo?: any; }) => Generator +>foo2 : ({ foo }: { foo?: any; }) => Generator >foo : any >yield "a" : any >"a" : "a" diff --git a/testdata/baselines/reference/submodule/compiler/expressionsForbiddenInParameterInitializers.types.diff b/testdata/baselines/reference/submodule/compiler/expressionsForbiddenInParameterInitializers.types.diff index f688c51377..3802721220 100644 --- a/testdata/baselines/reference/submodule/compiler/expressionsForbiddenInParameterInitializers.types.diff +++ b/testdata/baselines/reference/submodule/compiler/expressionsForbiddenInParameterInitializers.types.diff @@ -8,16 +8,9 @@ ->foo : typeof import("bar") ->await import("./bar") : typeof import("bar") ->import("./bar") : Promise -+>foo : ({ foo = await import("./bar") }: { foo?: typeof import("./bar"); }) => Promise ++>foo : ({ foo }: { foo?: typeof import("./bar"); }) => Promise +>foo : typeof import("./bar") +>await import("./bar") : typeof import("./bar") +>import("./bar") : Promise >"./bar" : "./bar" } - - export function* foo2({ foo = yield "a" }) { -->foo2 : ({ foo }: { foo?: any; }) => Generator -+>foo2 : ({ foo = yield "a" }: { foo?: any; }) => Generator - >foo : any - >yield "a" : any - >"a" : "a" \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/fallbackToBindingPatternForTypeInference.types b/testdata/baselines/reference/submodule/compiler/fallbackToBindingPatternForTypeInference.types index 6d348515c4..4c73bda6bc 100644 --- a/testdata/baselines/reference/submodule/compiler/fallbackToBindingPatternForTypeInference.types +++ b/testdata/baselines/reference/submodule/compiler/fallbackToBindingPatternForTypeInference.types @@ -41,7 +41,7 @@ trans(([{g},{h}]) => 'foo'); trans(({a, b = 10}) => a); >trans(({a, b = 10}) => a) : number >trans : (f: (x: T) => string) => number ->({a, b = 10}) => a : ({ a, b = 10 }: { a: any; b?: number; }) => any +>({a, b = 10}) => a : ({ a, b }: { a: any; b?: number; }) => any >a : any >b : number >10 : 10 diff --git a/testdata/baselines/reference/submodule/compiler/fallbackToBindingPatternForTypeInference.types.diff b/testdata/baselines/reference/submodule/compiler/fallbackToBindingPatternForTypeInference.types.diff deleted file mode 100644 index ea55f09eba..0000000000 --- a/testdata/baselines/reference/submodule/compiler/fallbackToBindingPatternForTypeInference.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.fallbackToBindingPatternForTypeInference.types -+++ new.fallbackToBindingPatternForTypeInference.types -@@= skipped -40, +40 lines =@@ - trans(({a, b = 10}) => a); - >trans(({a, b = 10}) => a) : number - >trans : (f: (x: T) => string) => number -->({a, b = 10}) => a : ({ a, b }: { a: any; b?: number; }) => any -+>({a, b = 10}) => a : ({ a, b = 10 }: { a: any; b?: number; }) => any - >a : any - >b : number - >10 : 10 \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/intraBindingPatternReferences.types b/testdata/baselines/reference/submodule/compiler/intraBindingPatternReferences.types index 3732507208..9dd18caaa5 100644 --- a/testdata/baselines/reference/submodule/compiler/intraBindingPatternReferences.types +++ b/testdata/baselines/reference/submodule/compiler/intraBindingPatternReferences.types @@ -52,8 +52,8 @@ const { f1, f2 = f1, f3 = f2 } = { f1: 1 }; // Example that requires padding of object literal types at depth const mockCallback = ({ event: { params = {} } = {} }) => {}; ->mockCallback : ({ event: { params = {} } = {} }: { event?: { params?: {} | undefined; } | undefined; }) => void ->({ event: { params = {} } = {} }) => {} : ({ event: { params = {} } = {} }: { event?: { params?: {} | undefined; } | undefined; }) => void +>mockCallback : ({ event: { params } }: { event?: { params?: {} | undefined; } | undefined; }) => void +>({ event: { params = {} } = {} }) => {} : ({ event: { params } }: { event?: { params?: {} | undefined; } | undefined; }) => void >event : any >params : {} >{} : {} diff --git a/testdata/baselines/reference/submodule/compiler/intraBindingPatternReferences.types.diff b/testdata/baselines/reference/submodule/compiler/intraBindingPatternReferences.types.diff deleted file mode 100644 index b9680bfcab..0000000000 --- a/testdata/baselines/reference/submodule/compiler/intraBindingPatternReferences.types.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- old.intraBindingPatternReferences.types -+++ new.intraBindingPatternReferences.types -@@= skipped -51, +51 lines =@@ - - // Example that requires padding of object literal types at depth - const mockCallback = ({ event: { params = {} } = {} }) => {}; -->mockCallback : ({ event: { params } }: { event?: { params?: {} | undefined; } | undefined; }) => void -->({ event: { params = {} } = {} }) => {} : ({ event: { params } }: { event?: { params?: {} | undefined; } | undefined; }) => void -+>mockCallback : ({ event: { params = {} } = {} }: { event?: { params?: {} | undefined; } | undefined; }) => void -+>({ event: { params = {} } = {} }) => {} : ({ event: { params = {} } = {} }: { event?: { params?: {} | undefined; } | undefined; }) => void - >event : any - >params : {} - >{} : {} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxFragmentFactoryNoUnusedLocals.types b/testdata/baselines/reference/submodule/compiler/jsxFragmentFactoryNoUnusedLocals.types index 79f3dc7322..c3642419a2 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFragmentFactoryNoUnusedLocals.types +++ b/testdata/baselines/reference/submodule/compiler/jsxFragmentFactoryNoUnusedLocals.types @@ -14,7 +14,7 @@ type CounterProps = { } export function Counter({ count = 0 }: CounterProps) { ->Counter : ({ count = 0 }: CounterProps) => JSX.Element +>Counter : ({ count }: CounterProps) => JSX.Element >count : number >0 : 0 diff --git a/testdata/baselines/reference/submodule/compiler/jsxFragmentFactoryNoUnusedLocals.types.diff b/testdata/baselines/reference/submodule/compiler/jsxFragmentFactoryNoUnusedLocals.types.diff index 3243d77a9a..5496756d76 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFragmentFactoryNoUnusedLocals.types.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxFragmentFactoryNoUnusedLocals.types.diff @@ -8,12 +8,4 @@ +>createElement : { (type: "input", props?: import("react").InputHTMLAttributes & import("react").ClassAttributes, ...children: import("react").ReactNode[]): import("react").DetailedReactHTMLElement, HTMLInputElement>;

, T extends HTMLElement>(type: keyof import("react").ReactHTML, props?: import("react").ClassAttributes & P, ...children: import("react").ReactNode[]): import("react").DetailedReactHTMLElement;

, T extends SVGElement>(type: keyof import("react").ReactSVG, props?: import("react").ClassAttributes & P, ...children: import("react").ReactNode[]): import("react").ReactSVGElement;

, T extends Element>(type: string, props?: import("react").ClassAttributes & P, ...children: import("react").ReactNode[]): import("react").DOMElement;

(type: import("react").SFC

, props?: import("react").Attributes & P, ...children: import("react").ReactNode[]): import("react").SFCElement

;

(type: import("react").ClassType, import("react").ClassicComponentClass

>, props?: import("react").ClassAttributes> & P, ...children: import("react").ReactNode[]): import("react").CElement>; , C extends import("react").ComponentClass>(type: import("react").ClassType, props?: import("react").ClassAttributes & P, ...children: import("react").ReactNode[]): import("react").CElement;

(type: string | import("react").ComponentClass | import("react").SFC

, props?: import("react").Attributes & P, ...children: import("react").ReactNode[]): import("react").ReactElement

; (type: "input", props?: import("react").InputHTMLAttributes & import("react").ClassAttributes, ...children: import("react").ReactNode[]): import("react").DetailedReactHTMLElement, HTMLInputElement>;

, T extends HTMLElement>(type: keyof import("react").ReactHTML, props?: import("react").ClassAttributes & P, ...children: import("react").ReactNode[]): import("react").DetailedReactHTMLElement;

, T extends SVGElement>(type: keyof import("react").ReactSVG, props?: import("react").ClassAttributes & P, ...children: import("react").ReactNode[]): import("react").ReactSVGElement;

, T extends Element>(type: string, props?: import("react").ClassAttributes & P, ...children: import("react").ReactNode[]): import("react").DOMElement;

(type: import("react").SFC

, props?: import("react").Attributes & P, ...children: import("react").ReactNode[]): import("react").SFCElement

;

(type: import("react").ClassType, import("react").ClassicComponentClass

>, props?: import("react").ClassAttributes> & P, ...children: import("react").ReactNode[]): import("react").CElement>; , C extends import("react").ComponentClass>(type: import("react").ClassType, props?: import("react").ClassAttributes & P, ...children: import("react").ReactNode[]): import("react").CElement;

(type: string | import("react").ComponentClass | import("react").SFC

, props?: import("react").Attributes & P, ...children: import("react").ReactNode[]): import("react").ReactElement

; } type CounterProps = { - >CounterProps : CounterProps -@@= skipped -10, +10 lines =@@ - } - - export function Counter({ count = 0 }: CounterProps) { -->Counter : ({ count }: CounterProps) => JSX.Element -+>Counter : ({ count = 0 }: CounterProps) => JSX.Element - >count : number - >0 : 0 + >CounterProps : CounterProps \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxPartialSpread.types b/testdata/baselines/reference/submodule/compiler/jsxPartialSpread.types index 216620b325..98adf8ad08 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxPartialSpread.types +++ b/testdata/baselines/reference/submodule/compiler/jsxPartialSpread.types @@ -15,7 +15,7 @@ import React from 'react'; >React : typeof React export function Repro({ SelectProps = {} }: { SelectProps?: Partial[0]> }) { ->Repro : ({ SelectProps = {} }: { SelectProps?: Partial<{ value?: unknown; }> | undefined; }) => JSX.Element +>Repro : ({ SelectProps }: { SelectProps?: Partial<{ value?: unknown; }> | undefined; }) => JSX.Element >SelectProps : Partial<{ value?: unknown; }> >{} : {} >SelectProps : Partial<{ value?: unknown; }> | undefined diff --git a/testdata/baselines/reference/submodule/compiler/jsxPartialSpread.types.diff b/testdata/baselines/reference/submodule/compiler/jsxPartialSpread.types.diff index bd5adf321c..1e6b0ee380 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxPartialSpread.types.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxPartialSpread.types.diff @@ -5,7 +5,7 @@ export function Repro({ SelectProps = {} }: { SelectProps?: Partial[0]> }) { ->Repro : ({ SelectProps }: { SelectProps?: Partial[0]>; }) => JSX.Element -+>Repro : ({ SelectProps = {} }: { SelectProps?: Partial<{ value?: unknown; }> | undefined; }) => JSX.Element ++>Repro : ({ SelectProps }: { SelectProps?: Partial<{ value?: unknown; }> | undefined; }) => JSX.Element >SelectProps : Partial<{ value?: unknown; }> >{} : {} >SelectProps : Partial<{ value?: unknown; }> | undefined \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/noImplicitAnyDestructuringParameterDeclaration.types b/testdata/baselines/reference/submodule/compiler/noImplicitAnyDestructuringParameterDeclaration.types index 7204ad0558..8ada168de0 100644 --- a/testdata/baselines/reference/submodule/compiler/noImplicitAnyDestructuringParameterDeclaration.types +++ b/testdata/baselines/reference/submodule/compiler/noImplicitAnyDestructuringParameterDeclaration.types @@ -9,7 +9,7 @@ function f1([a], {b}, c, d) { // error >d : any } function f2([a = undefined], {b = null}, c = undefined, d = null) { // error ->f2 : ([a = undefined]: [any?], { b = null }: { b?: any; }, c?: any, d?: any) => void +>f2 : ([a]: [any?], { b }: { b?: any; }, c?: any, d?: any) => void >a : any >undefined : undefined >b : any diff --git a/testdata/baselines/reference/submodule/compiler/noImplicitAnyDestructuringParameterDeclaration.types.diff b/testdata/baselines/reference/submodule/compiler/noImplicitAnyDestructuringParameterDeclaration.types.diff deleted file mode 100644 index 399b8ce294..0000000000 --- a/testdata/baselines/reference/submodule/compiler/noImplicitAnyDestructuringParameterDeclaration.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.noImplicitAnyDestructuringParameterDeclaration.types -+++ new.noImplicitAnyDestructuringParameterDeclaration.types -@@= skipped -8, +8 lines =@@ - >d : any - } - function f2([a = undefined], {b = null}, c = undefined, d = null) { // error -->f2 : ([a]: [any?], { b }: { b?: any; }, c?: any, d?: any) => void -+>f2 : ([a = undefined]: [any?], { b = null }: { b?: any; }, c?: any, d?: any) => void - >a : any - >undefined : undefined - >b : any \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/optionalParameterInDestructuringWithInitializer.types b/testdata/baselines/reference/submodule/compiler/optionalParameterInDestructuringWithInitializer.types index f0f1b56be8..4eeb42627b 100644 --- a/testdata/baselines/reference/submodule/compiler/optionalParameterInDestructuringWithInitializer.types +++ b/testdata/baselines/reference/submodule/compiler/optionalParameterInDestructuringWithInitializer.types @@ -30,7 +30,7 @@ function func1( {a, b}: {a: number, b?: number} = {a: 1, b: 2} ) { } function func2( {a, b = 3}: {a: number, b?:number} = {a: 1,b: 2} ) { ->func2 : ({ a, b = 3 }?: { a: number; b?: number | undefined; }) => void +>func2 : ({ a, b }?: { a: number; b?: number | undefined; }) => void >a : number >b : number >3 : 3 @@ -100,7 +100,7 @@ function func4( {a: {b, c}, d}: {a: {b: number,c?: number},d: number} = {a: {b: } function func5({a: {b, c = 4}, d}: {a: {b: number,c?: number},d: number} = {a: {b: 1,c: 2},d: 3} ) { ->func5 : ({ a: { b, c = 4 }, d }?: { a: { b: number; c?: number | undefined; }; d: number; }) => void +>func5 : ({ a: { b, c }, d }?: { a: { b: number; c?: number | undefined; }; d: number; }) => void >a : any >b : number >c : number @@ -130,7 +130,7 @@ function func5({a: {b, c = 4}, d}: {a: {b: number,c?: number},d: number} = {a: { } function func6( {a: {b, c} = {b: 4, c: 5}, d}: {a: {b: number, c?: number}, d: number} = {a: {b: 1,c: 2}, d: 3} ) { ->func6 : ({ a: { b, c } = { b: 4, c: 5 }, d }?: { a: { b: number; c?: number | undefined; }; d: number; }) => void +>func6 : ({ a: { b, c }, d }?: { a: { b: number; c?: number | undefined; }; d: number; }) => void >a : any >b : number >c : number | undefined @@ -164,7 +164,7 @@ function func6( {a: {b, c} = {b: 4, c: 5}, d}: {a: {b: number, c?: number}, d: n } function func7( {a: {b, c = 6} = {b: 4, c: 5}, d}: {a: {b: number, c?: number}, d: number} = {a: {b: 1, c: 2}, d: 3} ) { ->func7 : ({ a: { b, c = 6 } = { b: 4, c: 5 }, d }?: { a: { b: number; c?: number | undefined; }; d: number; }) => void +>func7 : ({ a: { b, c }, d }?: { a: { b: number; c?: number | undefined; }; d: number; }) => void >a : any >b : number >c : number @@ -223,7 +223,7 @@ performFoo(); >performFoo : ({ bar }?: Foo) => void function performFoo2({ bar = null }: Foo = {}) { ->performFoo2 : ({ bar = null }?: Foo) => void +>performFoo2 : ({ bar }?: Foo) => void >bar : number >{} : {} @@ -239,5 +239,5 @@ declare function useBar2(bar: number | undefined): void; performFoo2(); >performFoo2() : void ->performFoo2 : ({ bar = null }?: Foo) => void +>performFoo2 : ({ bar }?: Foo) => void diff --git a/testdata/baselines/reference/submodule/compiler/optionalParameterInDestructuringWithInitializer.types.diff b/testdata/baselines/reference/submodule/compiler/optionalParameterInDestructuringWithInitializer.types.diff index b7c1903e13..50b9014ff8 100644 --- a/testdata/baselines/reference/submodule/compiler/optionalParameterInDestructuringWithInitializer.types.diff +++ b/testdata/baselines/reference/submodule/compiler/optionalParameterInDestructuringWithInitializer.types.diff @@ -14,7 +14,7 @@ function func2( {a, b = 3}: {a: number, b?:number} = {a: 1,b: 2} ) { ->func2 : ({ a, b }?: { a: number; b?: number; }) => void -+>func2 : ({ a, b = 3 }?: { a: number; b?: number | undefined; }) => void ++>func2 : ({ a, b }?: { a: number; b?: number | undefined; }) => void >a : number >b : number >3 : 3 @@ -47,7 +47,7 @@ function func5({a: {b, c = 4}, d}: {a: {b: number,c?: number},d: number} = {a: {b: 1,c: 2},d: 3} ) { ->func5 : ({ a: { b, c }, d }?: { a: { b: number; c?: number; }; d: number; }) => void -+>func5 : ({ a: { b, c = 4 }, d }?: { a: { b: number; c?: number | undefined; }; d: number; }) => void ++>func5 : ({ a: { b, c }, d }?: { a: { b: number; c?: number | undefined; }; d: number; }) => void >a : any >b : number >c : number @@ -63,7 +63,7 @@ function func6( {a: {b, c} = {b: 4, c: 5}, d}: {a: {b: number, c?: number}, d: number} = {a: {b: 1,c: 2}, d: 3} ) { ->func6 : ({ a: { b, c }, d }?: { a: { b: number; c?: number; }; d: number; }) => void -+>func6 : ({ a: { b, c } = { b: 4, c: 5 }, d }?: { a: { b: number; c?: number | undefined; }; d: number; }) => void ++>func6 : ({ a: { b, c }, d }?: { a: { b: number; c?: number | undefined; }; d: number; }) => void >a : any >b : number >c : number | undefined @@ -81,7 +81,7 @@ function func7( {a: {b, c = 6} = {b: 4, c: 5}, d}: {a: {b: number, c?: number}, d: number} = {a: {b: 1, c: 2}, d: 3} ) { ->func7 : ({ a: { b, c }, d }?: { a: { b: number; c?: number; }; d: number; }) => void -+>func7 : ({ a: { b, c = 6 } = { b: 4, c: 5 }, d }?: { a: { b: number; c?: number | undefined; }; d: number; }) => void ++>func7 : ({ a: { b, c }, d }?: { a: { b: number; c?: number | undefined; }; d: number; }) => void >a : any >b : number >c : number @@ -93,19 +93,4 @@ +>a : { b: number; c?: number | undefined; } >b : number >c : number | undefined - >d : number -@@= skipped -48, +48 lines =@@ - >performFoo : ({ bar }?: Foo) => void - - function performFoo2({ bar = null }: Foo = {}) { -->performFoo2 : ({ bar }?: Foo) => void -+>performFoo2 : ({ bar = null }?: Foo) => void - >bar : number - >{} : {} - -@@= skipped -16, +16 lines =@@ - - performFoo2(); - >performFoo2() : void -->performFoo2 : ({ bar }?: Foo) => void -+>performFoo2 : ({ bar = null }?: Foo) => void + >d : number \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/parameterDestructuringObjectLiteral.js b/testdata/baselines/reference/submodule/compiler/parameterDestructuringObjectLiteral.js index 8f15c4cde8..24730e2b55 100644 --- a/testdata/baselines/reference/submodule/compiler/parameterDestructuringObjectLiteral.js +++ b/testdata/baselines/reference/submodule/compiler/parameterDestructuringObjectLiteral.js @@ -23,25 +23,6 @@ fn2({ headers: { foo: 1 } }); declare const fn1: (options: { headers?: {}; }) => void; -declare const fn2: ({ headers = {} }: { +declare const fn2: ({ headers }: { headers?: {}; }) => void; - - -//// [DtsFileErrors] - - -parameterDestructuringObjectLiteral.d.ts(5,23): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. - - -==== parameterDestructuringObjectLiteral.d.ts (1 errors) ==== - // Repro from #22644 - declare const fn1: (options: { - headers?: {}; - }) => void; - declare const fn2: ({ headers = {} }: { - ~~~~~~~ -!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. - headers?: {}; - }) => void; - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/parameterDestructuringObjectLiteral.js.diff b/testdata/baselines/reference/submodule/compiler/parameterDestructuringObjectLiteral.js.diff index bf7828cce3..f800b91f80 100644 --- a/testdata/baselines/reference/submodule/compiler/parameterDestructuringObjectLiteral.js.diff +++ b/testdata/baselines/reference/submodule/compiler/parameterDestructuringObjectLiteral.js.diff @@ -18,27 +18,4 @@ +// Repro from #22644 declare const fn1: (options: { headers?: {}; - }) => void; --declare const fn2: ({ headers }: { -+declare const fn2: ({ headers = {} }: { - headers?: {}; - }) => void; -+ -+ -+//// [DtsFileErrors] -+ -+ -+parameterDestructuringObjectLiteral.d.ts(5,23): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. -+ -+ -+==== parameterDestructuringObjectLiteral.d.ts (1 errors) ==== -+ // Repro from #22644 -+ declare const fn1: (options: { -+ headers?: {}; -+ }) => void; -+ declare const fn2: ({ headers = {} }: { -+ ~~~~~~~ -+!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. -+ headers?: {}; -+ }) => void; -+ \ No newline at end of file + }) => void; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/parameterDestructuringObjectLiteral.types b/testdata/baselines/reference/submodule/compiler/parameterDestructuringObjectLiteral.types index 8097760ee6..1dc67d7524 100644 --- a/testdata/baselines/reference/submodule/compiler/parameterDestructuringObjectLiteral.types +++ b/testdata/baselines/reference/submodule/compiler/parameterDestructuringObjectLiteral.types @@ -19,14 +19,14 @@ fn1({ headers: { foo: 1 } }); >1 : 1 const fn2 = ({ headers = {} }) => { }; ->fn2 : ({ headers = {} }: { headers?: {}; }) => void ->({ headers = {} }) => { } : ({ headers = {} }: { headers?: {}; }) => void +>fn2 : ({ headers }: { headers?: {}; }) => void +>({ headers = {} }) => { } : ({ headers }: { headers?: {}; }) => void >headers : {} >{} : {} fn2({ headers: { foo: 1 } }); >fn2({ headers: { foo: 1 } }) : void ->fn2 : ({ headers = {} }: { headers?: {}; }) => void +>fn2 : ({ headers }: { headers?: {}; }) => void >{ headers: { foo: 1 } } : { headers: { foo: number; }; } >headers : { foo: number; } >{ foo: 1 } : { foo: number; } diff --git a/testdata/baselines/reference/submodule/compiler/parameterDestructuringObjectLiteral.types.diff b/testdata/baselines/reference/submodule/compiler/parameterDestructuringObjectLiteral.types.diff deleted file mode 100644 index 92dd581f53..0000000000 --- a/testdata/baselines/reference/submodule/compiler/parameterDestructuringObjectLiteral.types.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.parameterDestructuringObjectLiteral.types -+++ new.parameterDestructuringObjectLiteral.types -@@= skipped -18, +18 lines =@@ - >1 : 1 - - const fn2 = ({ headers = {} }) => { }; -->fn2 : ({ headers }: { headers?: {}; }) => void -->({ headers = {} }) => { } : ({ headers }: { headers?: {}; }) => void -+>fn2 : ({ headers = {} }: { headers?: {}; }) => void -+>({ headers = {} }) => { } : ({ headers = {} }: { headers?: {}; }) => void - >headers : {} - >{} : {} - - fn2({ headers: { foo: 1 } }); - >fn2({ headers: { foo: 1 } }) : void -->fn2 : ({ headers }: { headers?: {}; }) => void -+>fn2 : ({ headers = {} }: { headers?: {}; }) => void - >{ headers: { foo: 1 } } : { headers: { foo: number; }; } - >headers : { foo: number; } - >{ foo: 1 } : { foo: number; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/parameterInitializerBeforeDestructuringEmit.types b/testdata/baselines/reference/submodule/compiler/parameterInitializerBeforeDestructuringEmit.types index f2a01d580c..352781a023 100644 --- a/testdata/baselines/reference/submodule/compiler/parameterInitializerBeforeDestructuringEmit.types +++ b/testdata/baselines/reference/submodule/compiler/parameterInitializerBeforeDestructuringEmit.types @@ -10,7 +10,7 @@ interface Foo { } function foobar({ bar = {}, ...opts }: Foo = {}) { ->foobar : ({ bar = {}, ...opts }?: Foo) => void +>foobar : ({ bar, ...opts }?: Foo) => void >bar : any >{} : {} >opts : { baz?: any; } diff --git a/testdata/baselines/reference/submodule/compiler/parameterInitializerBeforeDestructuringEmit.types.diff b/testdata/baselines/reference/submodule/compiler/parameterInitializerBeforeDestructuringEmit.types.diff deleted file mode 100644 index 2d9b6a80eb..0000000000 --- a/testdata/baselines/reference/submodule/compiler/parameterInitializerBeforeDestructuringEmit.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.parameterInitializerBeforeDestructuringEmit.types -+++ new.parameterInitializerBeforeDestructuringEmit.types -@@= skipped -9, +9 lines =@@ - } - - function foobar({ bar = {}, ...opts }: Foo = {}) { -->foobar : ({ bar, ...opts }?: Foo) => void -+>foobar : ({ bar = {}, ...opts }?: Foo) => void - >bar : any - >{} : {} - >opts : { baz?: any; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/renamingDestructuredPropertyInFunctionType.js b/testdata/baselines/reference/submodule/compiler/renamingDestructuredPropertyInFunctionType.js index 1e5f9f7a9d..3004c896fa 100644 --- a/testdata/baselines/reference/submodule/compiler/renamingDestructuredPropertyInFunctionType.js +++ b/testdata/baselines/reference/submodule/compiler/renamingDestructuredPropertyInFunctionType.js @@ -183,7 +183,7 @@ declare const obj2: { method({ a: string }: O): string; }; declare function f6({ a: string }: O): void; -declare const f7: ({ a: string = "", b, c }: O) => void; +declare const f7: ({ a: string, b, c }: O) => void; declare const f8: ({ "a": string }: O) => void; declare function f9({ 2: string }: { 2: any; diff --git a/testdata/baselines/reference/submodule/compiler/renamingDestructuredPropertyInFunctionType.js.diff b/testdata/baselines/reference/submodule/compiler/renamingDestructuredPropertyInFunctionType.js.diff index 4f4ca68f86..a9e4e248a2 100644 --- a/testdata/baselines/reference/submodule/compiler/renamingDestructuredPropertyInFunctionType.js.diff +++ b/testdata/baselines/reference/submodule/compiler/renamingDestructuredPropertyInFunctionType.js.diff @@ -136,11 +136,7 @@ + method({ a: string }: O): string; }; declare function f6({ a: string }: O): void; --declare const f7: ({ a: string, b, c }: O) => void; -+declare const f7: ({ a: string = "", b, c }: O) => void; - declare const f8: ({ "a": string }: O) => void; - declare function f9({ 2: string }: { - 2: any; + declare const f7: ({ a: string, b, c }: O) => void; @@= skipped -94, +98 lines =@@ declare const f11: ({ [2]: string }: { 2: any; diff --git a/testdata/baselines/reference/submodule/compiler/renamingDestructuredPropertyInFunctionType.types b/testdata/baselines/reference/submodule/compiler/renamingDestructuredPropertyInFunctionType.types index 7c721b46cf..d9e6c83e91 100644 --- a/testdata/baselines/reference/submodule/compiler/renamingDestructuredPropertyInFunctionType.types +++ b/testdata/baselines/reference/submodule/compiler/renamingDestructuredPropertyInFunctionType.types @@ -243,14 +243,14 @@ const obj2 = { }; function f6({ a: string = "" }: O) { } ->f6 : ({ a: string = "" }: O) => void +>f6 : ({ a: string }: O) => void >a : any >string : string >"" : "" const f7 = ({ a: string = "", b, c }: O) => { }; ->f7 : ({ a: string = "", b, c }: O) => void ->({ a: string = "", b, c }: O) => { } : ({ a: string = "", b, c }: O) => void +>f7 : ({ a: string, b, c }: O) => void +>({ a: string = "", b, c }: O) => { } : ({ a: string, b, c }: O) => void >a : any >string : string >"" : "" @@ -279,7 +279,7 @@ const f11 = ({ [2]: string }) => { }; // In below case `string` should be kept because it is used function f12({ a: string = "" }: O): typeof string { return "a"; } ->f12 : ({ a: string = "" }: O) => string +>f12 : ({ a: string }: O) => string >a : any >string : string >"" : "" diff --git a/testdata/baselines/reference/submodule/compiler/renamingDestructuredPropertyInFunctionType.types.diff b/testdata/baselines/reference/submodule/compiler/renamingDestructuredPropertyInFunctionType.types.diff index c89503c5e1..613c2e58ba 100644 --- a/testdata/baselines/reference/submodule/compiler/renamingDestructuredPropertyInFunctionType.types.diff +++ b/testdata/baselines/reference/submodule/compiler/renamingDestructuredPropertyInFunctionType.types.diff @@ -36,30 +36,12 @@ >a : any >string : string >string : string -@@= skipped -12, +12 lines =@@ - - }; - function f6({ a: string = "" }: O) { } -->f6 : ({ a: string }: O) => void -+>f6 : ({ a: string = "" }: O) => void - >a : any - >string : string - >"" : "" - - const f7 = ({ a: string = "", b, c }: O) => { }; -->f7 : ({ a: string, b, c }: O) => void -->({ a: string = "", b, c }: O) => { } : ({ a: string, b, c }: O) => void -+>f7 : ({ a: string = "", b, c }: O) => void -+>({ a: string = "", b, c }: O) => { } : ({ a: string = "", b, c }: O) => void - >a : any - >string : string - >"" : "" -@@= skipped -36, +36 lines =@@ +@@= skipped -48, +48 lines =@@ // In below case `string` should be kept because it is used function f12({ a: string = "" }: O): typeof string { return "a"; } ->f12 : ({ a: string }: O) => typeof string -+>f12 : ({ a: string = "" }: O) => string ++>f12 : ({ a: string }: O) => string >a : any >string : string >"" : "" \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/restParameterWithBindingPattern3.types b/testdata/baselines/reference/submodule/compiler/restParameterWithBindingPattern3.types index 905071be7a..23efbca1d9 100644 --- a/testdata/baselines/reference/submodule/compiler/restParameterWithBindingPattern3.types +++ b/testdata/baselines/reference/submodule/compiler/restParameterWithBindingPattern3.types @@ -2,14 +2,14 @@ === restParameterWithBindingPattern3.ts === function a(...[a = 1, b = true]: string[]) { } ->a : (...[a = 1, b = true]: string[]) => void +>a : (...[a, b]: string[]) => void >a : string >1 : 1 >b : string >true : true function b(...[...foo = []]: string[]) { } ->b : (...[...foo = []]: string[]) => void +>b : (...[...foo]: string[]) => void >foo : string[] >[] : undefined[] diff --git a/testdata/baselines/reference/submodule/compiler/restParameterWithBindingPattern3.types.diff b/testdata/baselines/reference/submodule/compiler/restParameterWithBindingPattern3.types.diff deleted file mode 100644 index dfe8c17547..0000000000 --- a/testdata/baselines/reference/submodule/compiler/restParameterWithBindingPattern3.types.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.restParameterWithBindingPattern3.types -+++ new.restParameterWithBindingPattern3.types -@@= skipped -1, +1 lines =@@ - - === restParameterWithBindingPattern3.ts === - function a(...[a = 1, b = true]: string[]) { } -->a : (...[a, b]: string[]) => void -+>a : (...[a = 1, b = true]: string[]) => void - >a : string - >1 : 1 - >b : string - >true : true - - function b(...[...foo = []]: string[]) { } -->b : (...[...foo]: string[]) => void -+>b : (...[...foo = []]: string[]) => void - >foo : string[] - >[] : undefined[] diff --git a/testdata/baselines/reference/submodule/compiler/shorthandPropertyAssignmentsInDestructuring.types b/testdata/baselines/reference/submodule/compiler/shorthandPropertyAssignmentsInDestructuring.types index 45f11bdb34..36fda05019 100644 --- a/testdata/baselines/reference/submodule/compiler/shorthandPropertyAssignmentsInDestructuring.types +++ b/testdata/baselines/reference/submodule/compiler/shorthandPropertyAssignmentsInDestructuring.types @@ -427,7 +427,7 @@ }); function foo({a = 4, b = { x: 5 }}) { ->foo : ({ a = 4, b = { x: 5 } }: { a?: number; b?: { x: number; }; }) => void +>foo : ({ a, b }: { a?: number; b?: { x: number; }; }) => void >a : number >4 : 4 >b : { x: number; } diff --git a/testdata/baselines/reference/submodule/compiler/shorthandPropertyAssignmentsInDestructuring.types.diff b/testdata/baselines/reference/submodule/compiler/shorthandPropertyAssignmentsInDestructuring.types.diff deleted file mode 100644 index a847a7406f..0000000000 --- a/testdata/baselines/reference/submodule/compiler/shorthandPropertyAssignmentsInDestructuring.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.shorthandPropertyAssignmentsInDestructuring.types -+++ new.shorthandPropertyAssignmentsInDestructuring.types -@@= skipped -426, +426 lines =@@ - }); - - function foo({a = 4, b = { x: 5 }}) { -->foo : ({ a, b }: { a?: number; b?: { x: number; }; }) => void -+>foo : ({ a = 4, b = { x: 5 } }: { a?: number; b?: { x: number; }; }) => void - >a : number - >4 : 4 - >b : { x: number; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.types b/testdata/baselines/reference/submodule/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.types index 81a66a4268..1db90ef9bf 100644 --- a/testdata/baselines/reference/submodule/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.types +++ b/testdata/baselines/reference/submodule/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.types @@ -427,7 +427,7 @@ }); function foo({a = 4, b = { x: 5 }}) { ->foo : ({ a = 4, b = { x: 5 } }: { a?: number; b?: { x: number; }; }) => void +>foo : ({ a, b }: { a?: number; b?: { x: number; }; }) => void >a : number >4 : 4 >b : { x: number; } diff --git a/testdata/baselines/reference/submodule/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.types.diff b/testdata/baselines/reference/submodule/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.types.diff deleted file mode 100644 index f50459bdb4..0000000000 --- a/testdata/baselines/reference/submodule/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.shorthandPropertyAssignmentsInDestructuring_ES6.types -+++ new.shorthandPropertyAssignmentsInDestructuring_ES6.types -@@= skipped -426, +426 lines =@@ - }); - - function foo({a = 4, b = { x: 5 }}) { -->foo : ({ a, b }: { a?: number; b?: { x: number; }; }) => void -+>foo : ({ a = 4, b = { x: 5 } }: { a?: number; b?: { x: number; }; }) => void - >a : number - >4 : 4 - >b : { x: number; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.types b/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.types index b6d995d90d..f169e71966 100644 --- a/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.types +++ b/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.types @@ -36,7 +36,7 @@ var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "no >"none" : "none" function foo1( ->foo1 : ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void +>foo1 : ({ skills: { primary: primaryA, secondary: secondaryA } }?: Robot) => void { skills: { >skills : any @@ -69,7 +69,7 @@ function foo1( >primaryA : string } function foo2( ->foo2 : ({ name: nameC = "name", skills: { primary: primaryB = "primary", secondary: secondaryB = "secondary" } = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void +>foo2 : ({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }?: Robot) => void { name: nameC = "name", >name : any @@ -107,7 +107,7 @@ function foo2( >secondaryB : string } function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA) { ->foo3 : ({ skills = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void +>foo3 : ({ skills }?: Robot) => void >skills : { primary?: string; secondary?: string; } >{ primary: "SomeSkill", secondary: "someSkill" } : { primary: string; secondary: string; } >primary : string @@ -128,12 +128,12 @@ function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Ro foo1(robotA); >foo1(robotA) : void ->foo1 : ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void +>foo1 : ({ skills: { primary: primaryA, secondary: secondaryA } }?: Robot) => void >robotA : Robot foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); >foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void ->foo1 : ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void +>foo1 : ({ skills: { primary: primaryA, secondary: secondaryA } }?: Robot) => void >{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } >name : string >"Edger" : "Edger" @@ -146,12 +146,12 @@ foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" foo2(robotA); >foo2(robotA) : void ->foo2 : ({ name: nameC = "name", skills: { primary: primaryB = "primary", secondary: secondaryB = "secondary" } = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void +>foo2 : ({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }?: Robot) => void >robotA : Robot foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); >foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void ->foo2 : ({ name: nameC = "name", skills: { primary: primaryB = "primary", secondary: secondaryB = "secondary" } = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void +>foo2 : ({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }?: Robot) => void >{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } >name : string >"Edger" : "Edger" @@ -164,12 +164,12 @@ foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" foo3(robotA); >foo3(robotA) : void ->foo3 : ({ skills = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void +>foo3 : ({ skills }?: Robot) => void >robotA : Robot foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); >foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void ->foo3 : ({ skills = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void +>foo3 : ({ skills }?: Robot) => void >{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } >name : string >"Edger" : "Edger" diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.types.diff b/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.types.diff deleted file mode 100644 index c7be1027c8..0000000000 --- a/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.types.diff +++ /dev/null @@ -1,74 +0,0 @@ ---- old.sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.types -+++ new.sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.types -@@= skipped -35, +35 lines =@@ - >"none" : "none" - - function foo1( -->foo1 : ({ skills: { primary: primaryA, secondary: secondaryA } }?: Robot) => void -+>foo1 : ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void - { - skills: { - >skills : any -@@= skipped -33, +33 lines =@@ - >primaryA : string - } - function foo2( -->foo2 : ({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }?: Robot) => void -+>foo2 : ({ name: nameC = "name", skills: { primary: primaryB = "primary", secondary: secondaryB = "secondary" } = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void - { - name: nameC = "name", - >name : any -@@= skipped -38, +38 lines =@@ - >secondaryB : string - } - function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA) { -->foo3 : ({ skills }?: Robot) => void -+>foo3 : ({ skills = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void - >skills : { primary?: string; secondary?: string; } - >{ primary: "SomeSkill", secondary: "someSkill" } : { primary: string; secondary: string; } - >primary : string -@@= skipped -21, +21 lines =@@ - - foo1(robotA); - >foo1(robotA) : void -->foo1 : ({ skills: { primary: primaryA, secondary: secondaryA } }?: Robot) => void -+>foo1 : ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void - >robotA : Robot - - foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); - >foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void -->foo1 : ({ skills: { primary: primaryA, secondary: secondaryA } }?: Robot) => void -+>foo1 : ({ skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void - >{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } - >name : string - >"Edger" : "Edger" -@@= skipped -18, +18 lines =@@ - - foo2(robotA); - >foo2(robotA) : void -->foo2 : ({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }?: Robot) => void -+>foo2 : ({ name: nameC = "name", skills: { primary: primaryB = "primary", secondary: secondaryB = "secondary" } = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void - >robotA : Robot - - foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); - >foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void -->foo2 : ({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }?: Robot) => void -+>foo2 : ({ name: nameC = "name", skills: { primary: primaryB = "primary", secondary: secondaryB = "secondary" } = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void - >{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } - >name : string - >"Edger" : "Edger" -@@= skipped -18, +18 lines =@@ - - foo3(robotA); - >foo3(robotA) : void -->foo3 : ({ skills }?: Robot) => void -+>foo3 : ({ skills = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void - >robotA : Robot - - foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); - >foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void -->foo3 : ({ skills }?: Robot) => void -+>foo3 : ({ skills = { primary: "SomeSkill", secondary: "someSkill" } }?: Robot) => void - >{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } - >name : string - >"Edger" : "Edger" \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.types b/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.types index f8abd5855a..cfdd1fe162 100644 --- a/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.types +++ b/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.types @@ -28,7 +28,7 @@ var robotA: Robot = { name: "mower", skill: "mowing" }; >"mowing" : "mowing" function foo1({ name: nameA = "" }: Robot = { }) { ->foo1 : ({ name: nameA = "" }?: Robot) => void +>foo1 : ({ name: nameA }?: Robot) => void >name : any >nameA : string >"" : "" @@ -42,7 +42,7 @@ function foo1({ name: nameA = "" }: Robot = { }) { >nameA : string } function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = {}) { ->foo2 : ({ name: nameB = "", skill: skillB = "noSkill" }?: Robot) => void +>foo2 : ({ name: nameB, skill: skillB }?: Robot) => void >name : any >nameB : string >"" : "" @@ -59,7 +59,7 @@ function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = { >nameB : string } function foo3({ name = "" }: Robot = {}) { ->foo3 : ({ name = "" }?: Robot) => void +>foo3 : ({ name }?: Robot) => void >name : string >"" : "" >{} : {} @@ -74,12 +74,12 @@ function foo3({ name = "" }: Robot = {}) { foo1(robotA); >foo1(robotA) : void ->foo1 : ({ name: nameA = "" }?: Robot) => void +>foo1 : ({ name: nameA }?: Robot) => void >robotA : Robot foo1({ name: "Edger", skill: "cutting edges" }); >foo1({ name: "Edger", skill: "cutting edges" }) : void ->foo1 : ({ name: nameA = "" }?: Robot) => void +>foo1 : ({ name: nameA }?: Robot) => void >{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } >name : string >"Edger" : "Edger" @@ -88,12 +88,12 @@ foo1({ name: "Edger", skill: "cutting edges" }); foo2(robotA); >foo2(robotA) : void ->foo2 : ({ name: nameB = "", skill: skillB = "noSkill" }?: Robot) => void +>foo2 : ({ name: nameB, skill: skillB }?: Robot) => void >robotA : Robot foo2({ name: "Edger", skill: "cutting edges" }); >foo2({ name: "Edger", skill: "cutting edges" }) : void ->foo2 : ({ name: nameB = "", skill: skillB = "noSkill" }?: Robot) => void +>foo2 : ({ name: nameB, skill: skillB }?: Robot) => void >{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } >name : string >"Edger" : "Edger" @@ -102,12 +102,12 @@ foo2({ name: "Edger", skill: "cutting edges" }); foo3(robotA); >foo3(robotA) : void ->foo3 : ({ name = "" }?: Robot) => void +>foo3 : ({ name }?: Robot) => void >robotA : Robot foo3({ name: "Edger", skill: "cutting edges" }); >foo3({ name: "Edger", skill: "cutting edges" }) : void ->foo3 : ({ name = "" }?: Robot) => void +>foo3 : ({ name }?: Robot) => void >{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } >name : string >"Edger" : "Edger" diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.types.diff b/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.types.diff deleted file mode 100644 index c53b5fe178..0000000000 --- a/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.types.diff +++ /dev/null @@ -1,74 +0,0 @@ ---- old.sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.types -+++ new.sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.types -@@= skipped -27, +27 lines =@@ - >"mowing" : "mowing" - - function foo1({ name: nameA = "" }: Robot = { }) { -->foo1 : ({ name: nameA }?: Robot) => void -+>foo1 : ({ name: nameA = "" }?: Robot) => void - >name : any - >nameA : string - >"" : "" -@@= skipped -14, +14 lines =@@ - >nameA : string - } - function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = {}) { -->foo2 : ({ name: nameB, skill: skillB }?: Robot) => void -+>foo2 : ({ name: nameB = "", skill: skillB = "noSkill" }?: Robot) => void - >name : any - >nameB : string - >"" : "" -@@= skipped -17, +17 lines =@@ - >nameB : string - } - function foo3({ name = "" }: Robot = {}) { -->foo3 : ({ name }?: Robot) => void -+>foo3 : ({ name = "" }?: Robot) => void - >name : string - >"" : "" - >{} : {} -@@= skipped -15, +15 lines =@@ - - foo1(robotA); - >foo1(robotA) : void -->foo1 : ({ name: nameA }?: Robot) => void -+>foo1 : ({ name: nameA = "" }?: Robot) => void - >robotA : Robot - - foo1({ name: "Edger", skill: "cutting edges" }); - >foo1({ name: "Edger", skill: "cutting edges" }) : void -->foo1 : ({ name: nameA }?: Robot) => void -+>foo1 : ({ name: nameA = "" }?: Robot) => void - >{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } - >name : string - >"Edger" : "Edger" -@@= skipped -14, +14 lines =@@ - - foo2(robotA); - >foo2(robotA) : void -->foo2 : ({ name: nameB, skill: skillB }?: Robot) => void -+>foo2 : ({ name: nameB = "", skill: skillB = "noSkill" }?: Robot) => void - >robotA : Robot - - foo2({ name: "Edger", skill: "cutting edges" }); - >foo2({ name: "Edger", skill: "cutting edges" }) : void -->foo2 : ({ name: nameB, skill: skillB }?: Robot) => void -+>foo2 : ({ name: nameB = "", skill: skillB = "noSkill" }?: Robot) => void - >{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } - >name : string - >"Edger" : "Edger" -@@= skipped -14, +14 lines =@@ - - foo3(robotA); - >foo3(robotA) : void -->foo3 : ({ name }?: Robot) => void -+>foo3 : ({ name = "" }?: Robot) => void - >robotA : Robot - - foo3({ name: "Edger", skill: "cutting edges" }); - >foo3({ name: "Edger", skill: "cutting edges" }) : void -->foo3 : ({ name }?: Robot) => void -+>foo3 : ({ name = "" }?: Robot) => void - >{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } - >name : string - >"Edger" : "Edger" \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.types b/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.types index 55753b9aa6..4812524f23 100644 --- a/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.types +++ b/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.types @@ -19,7 +19,7 @@ var robotA: Robot = [1, "mower", "mowing"]; >"mowing" : "mowing" function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) { ->foo1 : ([, nameA = "noName"]?: Robot) => void +>foo1 : ([, nameA]?: Robot) => void >nameA : string >"noName" : "noName" >[-1, "name", "skill"] : [number, string, string] @@ -37,7 +37,7 @@ function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) { } function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) { ->foo2 : ([numberB = -1]?: Robot) => void +>foo2 : ([numberB]?: Robot) => void >numberB : number >-1 : -1 >1 : 1 @@ -56,7 +56,7 @@ function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) { } function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) { ->foo3 : ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]?: Robot) => void +>foo3 : ([numberA2, nameA2, skillA2]?: Robot) => void >numberA2 : number >-1 : -1 >1 : 1 @@ -79,7 +79,7 @@ function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, } function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { ->foo4 : ([numberA3 = -1, ...robotAInfo]?: Robot) => void +>foo4 : ([numberA3, ...robotAInfo]?: Robot) => void >numberA3 : number >-1 : -1 >1 : 1 @@ -100,12 +100,12 @@ function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { foo1(robotA); >foo1(robotA) : void ->foo1 : ([, nameA = "noName"]?: Robot) => void +>foo1 : ([, nameA]?: Robot) => void >robotA : Robot foo1([2, "trimmer", "trimming"]); >foo1([2, "trimmer", "trimming"]) : void ->foo1 : ([, nameA = "noName"]?: Robot) => void +>foo1 : ([, nameA]?: Robot) => void >[2, "trimmer", "trimming"] : [number, string, string] >2 : 2 >"trimmer" : "trimmer" @@ -113,12 +113,12 @@ foo1([2, "trimmer", "trimming"]); foo2(robotA); >foo2(robotA) : void ->foo2 : ([numberB = -1]?: Robot) => void +>foo2 : ([numberB]?: Robot) => void >robotA : Robot foo2([2, "trimmer", "trimming"]); >foo2([2, "trimmer", "trimming"]) : void ->foo2 : ([numberB = -1]?: Robot) => void +>foo2 : ([numberB]?: Robot) => void >[2, "trimmer", "trimming"] : [number, string, string] >2 : 2 >"trimmer" : "trimmer" @@ -126,12 +126,12 @@ foo2([2, "trimmer", "trimming"]); foo3(robotA); >foo3(robotA) : void ->foo3 : ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]?: Robot) => void +>foo3 : ([numberA2, nameA2, skillA2]?: Robot) => void >robotA : Robot foo3([2, "trimmer", "trimming"]); >foo3([2, "trimmer", "trimming"]) : void ->foo3 : ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]?: Robot) => void +>foo3 : ([numberA2, nameA2, skillA2]?: Robot) => void >[2, "trimmer", "trimming"] : [number, string, string] >2 : 2 >"trimmer" : "trimmer" @@ -139,12 +139,12 @@ foo3([2, "trimmer", "trimming"]); foo4(robotA); >foo4(robotA) : void ->foo4 : ([numberA3 = -1, ...robotAInfo]?: Robot) => void +>foo4 : ([numberA3, ...robotAInfo]?: Robot) => void >robotA : Robot foo4([2, "trimmer", "trimming"]); >foo4([2, "trimmer", "trimming"]) : void ->foo4 : ([numberA3 = -1, ...robotAInfo]?: Robot) => void +>foo4 : ([numberA3, ...robotAInfo]?: Robot) => void >[2, "trimmer", "trimming"] : [number, string, string] >2 : 2 >"trimmer" : "trimmer" diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.types.diff b/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.types.diff deleted file mode 100644 index c542f20950..0000000000 --- a/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.types.diff +++ /dev/null @@ -1,98 +0,0 @@ ---- old.sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.types -+++ new.sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.types -@@= skipped -18, +18 lines =@@ - >"mowing" : "mowing" - - function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) { -->foo1 : ([, nameA]?: Robot) => void -+>foo1 : ([, nameA = "noName"]?: Robot) => void - >nameA : string - >"noName" : "noName" - >[-1, "name", "skill"] : [number, string, string] -@@= skipped -18, +18 lines =@@ - } - - function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) { -->foo2 : ([numberB]?: Robot) => void -+>foo2 : ([numberB = -1]?: Robot) => void - >numberB : number - >-1 : -1 - >1 : 1 -@@= skipped -19, +19 lines =@@ - } - - function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) { -->foo3 : ([numberA2, nameA2, skillA2]?: Robot) => void -+>foo3 : ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]?: Robot) => void - >numberA2 : number - >-1 : -1 - >1 : 1 -@@= skipped -23, +23 lines =@@ - } - - function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { -->foo4 : ([numberA3, ...robotAInfo]?: Robot) => void -+>foo4 : ([numberA3 = -1, ...robotAInfo]?: Robot) => void - >numberA3 : number - >-1 : -1 - >1 : 1 -@@= skipped -21, +21 lines =@@ - - foo1(robotA); - >foo1(robotA) : void -->foo1 : ([, nameA]?: Robot) => void -+>foo1 : ([, nameA = "noName"]?: Robot) => void - >robotA : Robot - - foo1([2, "trimmer", "trimming"]); - >foo1([2, "trimmer", "trimming"]) : void -->foo1 : ([, nameA]?: Robot) => void -+>foo1 : ([, nameA = "noName"]?: Robot) => void - >[2, "trimmer", "trimming"] : [number, string, string] - >2 : 2 - >"trimmer" : "trimmer" -@@= skipped -13, +13 lines =@@ - - foo2(robotA); - >foo2(robotA) : void -->foo2 : ([numberB]?: Robot) => void -+>foo2 : ([numberB = -1]?: Robot) => void - >robotA : Robot - - foo2([2, "trimmer", "trimming"]); - >foo2([2, "trimmer", "trimming"]) : void -->foo2 : ([numberB]?: Robot) => void -+>foo2 : ([numberB = -1]?: Robot) => void - >[2, "trimmer", "trimming"] : [number, string, string] - >2 : 2 - >"trimmer" : "trimmer" -@@= skipped -13, +13 lines =@@ - - foo3(robotA); - >foo3(robotA) : void -->foo3 : ([numberA2, nameA2, skillA2]?: Robot) => void -+>foo3 : ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]?: Robot) => void - >robotA : Robot - - foo3([2, "trimmer", "trimming"]); - >foo3([2, "trimmer", "trimming"]) : void -->foo3 : ([numberA2, nameA2, skillA2]?: Robot) => void -+>foo3 : ([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]?: Robot) => void - >[2, "trimmer", "trimming"] : [number, string, string] - >2 : 2 - >"trimmer" : "trimmer" -@@= skipped -13, +13 lines =@@ - - foo4(robotA); - >foo4(robotA) : void -->foo4 : ([numberA3, ...robotAInfo]?: Robot) => void -+>foo4 : ([numberA3 = -1, ...robotAInfo]?: Robot) => void - >robotA : Robot - - foo4([2, "trimmer", "trimming"]); - >foo4([2, "trimmer", "trimming"]) : void -->foo4 : ([numberA3, ...robotAInfo]?: Robot) => void -+>foo4 : ([numberA3 = -1, ...robotAInfo]?: Robot) => void - >[2, "trimmer", "trimming"] : [number, string, string] - >2 : 2 - >"trimmer" : "trimmer" \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.types b/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.types index fbea1a983f..9207bd98f3 100644 --- a/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.types +++ b/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.types @@ -20,7 +20,7 @@ var robotA: Robot = ["trimmer", ["trimming", "edging"]]; >"edging" : "edging" function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) { ->foo1 : ([, skillA = ["noSkill", "noSkill"]]?: Robot) => void +>foo1 : ([, skillA]?: Robot) => void >skillA : string[] >["noSkill", "noSkill"] : string[] >"noSkill" : "noSkill" @@ -40,7 +40,7 @@ function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "s } function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) { ->foo2 : ([nameMB = "noName"]?: Robot) => void +>foo2 : ([nameMB]?: Robot) => void >nameMB : string >"noName" : "noName" >["name", ["skill1", "skill2"]] : [string, string[]] @@ -58,7 +58,7 @@ function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) { } function foo3([nameMA = "noName", [ ->foo3 : ([nameMA = "noName", [primarySkillA = "primary", secondarySkillA = "secondary"] = ["noSkill", "noSkill"]]: Robot) => void +>foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: Robot) => void >nameMA : string >"noName" : "noName" @@ -85,12 +85,12 @@ function foo3([nameMA = "noName", [ foo1(robotA); >foo1(robotA) : void ->foo1 : ([, skillA = ["noSkill", "noSkill"]]?: Robot) => void +>foo1 : ([, skillA]?: Robot) => void >robotA : Robot foo1(["roomba", ["vacuum", "mopping"]]); >foo1(["roomba", ["vacuum", "mopping"]]) : void ->foo1 : ([, skillA = ["noSkill", "noSkill"]]?: Robot) => void +>foo1 : ([, skillA]?: Robot) => void >["roomba", ["vacuum", "mopping"]] : [string, string[]] >"roomba" : "roomba" >["vacuum", "mopping"] : string[] @@ -99,12 +99,12 @@ foo1(["roomba", ["vacuum", "mopping"]]); foo2(robotA); >foo2(robotA) : void ->foo2 : ([nameMB = "noName"]?: Robot) => void +>foo2 : ([nameMB]?: Robot) => void >robotA : Robot foo2(["roomba", ["vacuum", "mopping"]]); >foo2(["roomba", ["vacuum", "mopping"]]) : void ->foo2 : ([nameMB = "noName"]?: Robot) => void +>foo2 : ([nameMB]?: Robot) => void >["roomba", ["vacuum", "mopping"]] : [string, string[]] >"roomba" : "roomba" >["vacuum", "mopping"] : string[] @@ -113,12 +113,12 @@ foo2(["roomba", ["vacuum", "mopping"]]); foo3(robotA); >foo3(robotA) : void ->foo3 : ([nameMA = "noName", [primarySkillA = "primary", secondarySkillA = "secondary"] = ["noSkill", "noSkill"]]: Robot) => void +>foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: Robot) => void >robotA : Robot foo3(["roomba", ["vacuum", "mopping"]]); >foo3(["roomba", ["vacuum", "mopping"]]) : void ->foo3 : ([nameMA = "noName", [primarySkillA = "primary", secondarySkillA = "secondary"] = ["noSkill", "noSkill"]]: Robot) => void +>foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: Robot) => void >["roomba", ["vacuum", "mopping"]] : [string, string[]] >"roomba" : "roomba" >["vacuum", "mopping"] : string[] diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.types.diff b/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.types.diff deleted file mode 100644 index e0dd202cb2..0000000000 --- a/testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.types.diff +++ /dev/null @@ -1,74 +0,0 @@ ---- old.sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.types -+++ new.sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.types -@@= skipped -19, +19 lines =@@ - >"edging" : "edging" - - function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) { -->foo1 : ([, skillA]?: Robot) => void -+>foo1 : ([, skillA = ["noSkill", "noSkill"]]?: Robot) => void - >skillA : string[] - >["noSkill", "noSkill"] : string[] - >"noSkill" : "noSkill" -@@= skipped -20, +20 lines =@@ - } - - function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) { -->foo2 : ([nameMB]?: Robot) => void -+>foo2 : ([nameMB = "noName"]?: Robot) => void - >nameMB : string - >"noName" : "noName" - >["name", ["skill1", "skill2"]] : [string, string[]] -@@= skipped -18, +18 lines =@@ - } - - function foo3([nameMA = "noName", [ -->foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: Robot) => void -+>foo3 : ([nameMA = "noName", [primarySkillA = "primary", secondarySkillA = "secondary"] = ["noSkill", "noSkill"]]: Robot) => void - >nameMA : string - >"noName" : "noName" - -@@= skipped -27, +27 lines =@@ - - foo1(robotA); - >foo1(robotA) : void -->foo1 : ([, skillA]?: Robot) => void -+>foo1 : ([, skillA = ["noSkill", "noSkill"]]?: Robot) => void - >robotA : Robot - - foo1(["roomba", ["vacuum", "mopping"]]); - >foo1(["roomba", ["vacuum", "mopping"]]) : void -->foo1 : ([, skillA]?: Robot) => void -+>foo1 : ([, skillA = ["noSkill", "noSkill"]]?: Robot) => void - >["roomba", ["vacuum", "mopping"]] : [string, string[]] - >"roomba" : "roomba" - >["vacuum", "mopping"] : string[] -@@= skipped -14, +14 lines =@@ - - foo2(robotA); - >foo2(robotA) : void -->foo2 : ([nameMB]?: Robot) => void -+>foo2 : ([nameMB = "noName"]?: Robot) => void - >robotA : Robot - - foo2(["roomba", ["vacuum", "mopping"]]); - >foo2(["roomba", ["vacuum", "mopping"]]) : void -->foo2 : ([nameMB]?: Robot) => void -+>foo2 : ([nameMB = "noName"]?: Robot) => void - >["roomba", ["vacuum", "mopping"]] : [string, string[]] - >"roomba" : "roomba" - >["vacuum", "mopping"] : string[] -@@= skipped -14, +14 lines =@@ - - foo3(robotA); - >foo3(robotA) : void -->foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: Robot) => void -+>foo3 : ([nameMA = "noName", [primarySkillA = "primary", secondarySkillA = "secondary"] = ["noSkill", "noSkill"]]: Robot) => void - >robotA : Robot - - foo3(["roomba", ["vacuum", "mopping"]]); - >foo3(["roomba", ["vacuum", "mopping"]]) : void -->foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: Robot) => void -+>foo3 : ([nameMA = "noName", [primarySkillA = "primary", secondarySkillA = "secondary"] = ["noSkill", "noSkill"]]: Robot) => void - >["roomba", ["vacuum", "mopping"]] : [string, string[]] - >"roomba" : "roomba" - >["vacuum", "mopping"] : string[] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/useBeforeDeclaration_destructuring.types b/testdata/baselines/reference/submodule/compiler/useBeforeDeclaration_destructuring.types index 29796ee67a..daa554a25e 100644 --- a/testdata/baselines/reference/submodule/compiler/useBeforeDeclaration_destructuring.types +++ b/testdata/baselines/reference/submodule/compiler/useBeforeDeclaration_destructuring.types @@ -18,7 +18,7 @@ b; >b : string | number function test({c, d = c}: Record) {} ->test : ({ c, d = c }: Record) => void +>test : ({ c, d }: Record) => void >c : number >d : number >c : number diff --git a/testdata/baselines/reference/submodule/compiler/useBeforeDeclaration_destructuring.types.diff b/testdata/baselines/reference/submodule/compiler/useBeforeDeclaration_destructuring.types.diff deleted file mode 100644 index 0a78cbc3d3..0000000000 --- a/testdata/baselines/reference/submodule/compiler/useBeforeDeclaration_destructuring.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.useBeforeDeclaration_destructuring.types -+++ new.useBeforeDeclaration_destructuring.types -@@= skipped -17, +17 lines =@@ - >b : string | number - - function test({c, d = c}: Record) {} -->test : ({ c, d }: Record) => void -+>test : ({ c, d = c }: Record) => void - >c : number - >d : number - >c : number \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/argumentExpressionContextualTyping.types b/testdata/baselines/reference/submodule/conformance/argumentExpressionContextualTyping.types index 8ce36bf20c..193f1b8325 100644 --- a/testdata/baselines/reference/submodule/conformance/argumentExpressionContextualTyping.types +++ b/testdata/baselines/reference/submodule/conformance/argumentExpressionContextualTyping.types @@ -13,7 +13,7 @@ function foo({x: [a, b], y: {c, d, e}}) { } >e : any function bar({x: [a, b = 10], y: {c, d, e = { f:1 }}}) { } ->bar : ({ x: [a, b = 10], y: { c, d, e = { f: 1 } } }: { x: [any, number?]; y: { c: any; d: any; e?: { f: number; }; }; }) => void +>bar : ({ x: [a, b], y: { c, d, e } }: { x: [any, number?]; y: { c: any; d: any; e?: { f: number; }; }; }) => void >x : any >a : any >b : number diff --git a/testdata/baselines/reference/submodule/conformance/argumentExpressionContextualTyping.types.diff b/testdata/baselines/reference/submodule/conformance/argumentExpressionContextualTyping.types.diff deleted file mode 100644 index 71b176b81d..0000000000 --- a/testdata/baselines/reference/submodule/conformance/argumentExpressionContextualTyping.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.argumentExpressionContextualTyping.types -+++ new.argumentExpressionContextualTyping.types -@@= skipped -12, +12 lines =@@ - >e : any - - function bar({x: [a, b = 10], y: {c, d, e = { f:1 }}}) { } -->bar : ({ x: [a, b], y: { c, d, e } }: { x: [any, number?]; y: { c: any; d: any; e?: { f: number; }; }; }) => void -+>bar : ({ x: [a, b = 10], y: { c, d, e = { f: 1 } } }: { x: [any, number?]; y: { c: any; d: any; e?: { f: number; }; }; }) => void - >x : any - >a : any - >b : number \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/arrowFunctionExpressions.types b/testdata/baselines/reference/submodule/conformance/arrowFunctionExpressions.types index 5a579e4155..9e4e268288 100644 --- a/testdata/baselines/reference/submodule/conformance/arrowFunctionExpressions.types +++ b/testdata/baselines/reference/submodule/conformance/arrowFunctionExpressions.types @@ -77,8 +77,8 @@ var p4 = ([, ...a]) => { }; >a : any[] var p5 = ([a = 1]) => { }; ->p5 : ([a = 1]: [number?]) => void ->([a = 1]) => { } : ([a = 1]: [number?]) => void +>p5 : ([a]: [number?]) => void +>([a = 1]) => { } : ([a]: [number?]) => void >a : number >1 : 1 @@ -94,14 +94,14 @@ var p7 = ({ a: { b } }) => { }; >b : any var p8 = ({ a = 1 }) => { }; ->p8 : ({ a = 1 }: { a?: number; }) => void ->({ a = 1 }) => { } : ({ a = 1 }: { a?: number; }) => void +>p8 : ({ a }: { a?: number; }) => void +>({ a = 1 }) => { } : ({ a }: { a?: number; }) => void >a : number >1 : 1 var p9 = ({ a: { b = 1 } = { b: 1 } }) => { }; ->p9 : ({ a: { b = 1 } = { b: 1 } }: { a?: { b?: number; }; }) => void ->({ a: { b = 1 } = { b: 1 } }) => { } : ({ a: { b = 1 } = { b: 1 } }: { a?: { b?: number; }; }) => void +>p9 : ({ a: { b } }: { a?: { b?: number; }; }) => void +>({ a: { b = 1 } = { b: 1 } }) => { } : ({ a: { b } }: { a?: { b?: number; }; }) => void >a : any >b : number >1 : 1 diff --git a/testdata/baselines/reference/submodule/conformance/arrowFunctionExpressions.types.diff b/testdata/baselines/reference/submodule/conformance/arrowFunctionExpressions.types.diff deleted file mode 100644 index 34ab21a9f8..0000000000 --- a/testdata/baselines/reference/submodule/conformance/arrowFunctionExpressions.types.diff +++ /dev/null @@ -1,32 +0,0 @@ ---- old.arrowFunctionExpressions.types -+++ new.arrowFunctionExpressions.types -@@= skipped -76, +76 lines =@@ - >a : any[] - - var p5 = ([a = 1]) => { }; -->p5 : ([a]: [number?]) => void -->([a = 1]) => { } : ([a]: [number?]) => void -+>p5 : ([a = 1]: [number?]) => void -+>([a = 1]) => { } : ([a = 1]: [number?]) => void - >a : number - >1 : 1 - -@@= skipped -17, +17 lines =@@ - >b : any - - var p8 = ({ a = 1 }) => { }; -->p8 : ({ a }: { a?: number; }) => void -->({ a = 1 }) => { } : ({ a }: { a?: number; }) => void -+>p8 : ({ a = 1 }: { a?: number; }) => void -+>({ a = 1 }) => { } : ({ a = 1 }: { a?: number; }) => void - >a : number - >1 : 1 - - var p9 = ({ a: { b = 1 } = { b: 1 } }) => { }; -->p9 : ({ a: { b } }: { a?: { b?: number; }; }) => void -->({ a: { b = 1 } = { b: 1 } }) => { } : ({ a: { b } }: { a?: { b?: number; }; }) => void -+>p9 : ({ a: { b = 1 } = { b: 1 } }: { a?: { b?: number; }; }) => void -+>({ a: { b = 1 } = { b: 1 } }) => { } : ({ a: { b = 1 } = { b: 1 } }: { a?: { b?: number; }; }) => void - >a : any - >b : number - >1 : 1 \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/contextuallyTypedBindingInitializer.types b/testdata/baselines/reference/submodule/conformance/contextuallyTypedBindingInitializer.types index 54aa268af1..aceb31d8c1 100644 --- a/testdata/baselines/reference/submodule/conformance/contextuallyTypedBindingInitializer.types +++ b/testdata/baselines/reference/submodule/conformance/contextuallyTypedBindingInitializer.types @@ -7,7 +7,7 @@ interface Show { >x : number } function f({ show = v => v.toString() }: Show) {} ->f : ({ show = v => v.toString() }: Show) => void +>f : ({ show }: Show) => void >show : (x: number) => string >v => v.toString() : (v: number) => string >v : number @@ -17,7 +17,7 @@ function f({ show = v => v.toString() }: Show) {} >toString : (radix?: number) => string function f2({ "show": showRename = v => v.toString() }: Show) {} ->f2 : ({ "show": showRename = v => v.toString() }: Show) => void +>f2 : ({ "show": showRename }: Show) => void >showRename : (x: number) => string >v => v.toString() : (v: number) => string >v : number @@ -27,7 +27,7 @@ function f2({ "show": showRename = v => v.toString() }: Show) {} >toString : (radix?: number) => string function f3({ ["show"]: showRename = v => v.toString() }: Show) {} ->f3 : ({ ["show"]: showRename = v => v.toString() }: Show) => void +>f3 : ({ ["show"]: showRename }: Show) => void >"show" : "show" >showRename : (x: number) => string >v => v.toString() : (v: number) => string @@ -42,7 +42,7 @@ interface Nested { >nested : Show } function ff({ nested = { show: v => v.toString() } }: Nested) {} ->ff : ({ nested = { show: v => v.toString() } }: Nested) => void +>ff : ({ nested }: Nested) => void >nested : Show >{ show: v => v.toString() } : { show: (v: number) => string; } >show : (v: number) => string @@ -58,7 +58,7 @@ interface Tuples { >prop : [string, number] } function g({ prop = ["hello", 1234] }: Tuples) {} ->g : ({ prop = ["hello", 1234] }: Tuples) => void +>g : ({ prop }: Tuples) => void >prop : [string, number] >["hello", 1234] : [string, number] >"hello" : "hello" @@ -69,7 +69,7 @@ interface StringUnion { >prop : "bar" | "foo" } function h({ prop = "foo" }: StringUnion) {} ->h : ({ prop = "foo" }: StringUnion) => void +>h : ({ prop }: StringUnion) => void >prop : "bar" | "foo" >"foo" : "foo" diff --git a/testdata/baselines/reference/submodule/conformance/contextuallyTypedBindingInitializer.types.diff b/testdata/baselines/reference/submodule/conformance/contextuallyTypedBindingInitializer.types.diff deleted file mode 100644 index aee05d64c7..0000000000 --- a/testdata/baselines/reference/submodule/conformance/contextuallyTypedBindingInitializer.types.diff +++ /dev/null @@ -1,55 +0,0 @@ ---- old.contextuallyTypedBindingInitializer.types -+++ new.contextuallyTypedBindingInitializer.types -@@= skipped -6, +6 lines =@@ - >x : number - } - function f({ show = v => v.toString() }: Show) {} -->f : ({ show }: Show) => void -+>f : ({ show = v => v.toString() }: Show) => void - >show : (x: number) => string - >v => v.toString() : (v: number) => string - >v : number -@@= skipped -10, +10 lines =@@ - >toString : (radix?: number) => string - - function f2({ "show": showRename = v => v.toString() }: Show) {} -->f2 : ({ "show": showRename }: Show) => void -+>f2 : ({ "show": showRename = v => v.toString() }: Show) => void - >showRename : (x: number) => string - >v => v.toString() : (v: number) => string - >v : number -@@= skipped -10, +10 lines =@@ - >toString : (radix?: number) => string - - function f3({ ["show"]: showRename = v => v.toString() }: Show) {} -->f3 : ({ ["show"]: showRename }: Show) => void -+>f3 : ({ ["show"]: showRename = v => v.toString() }: Show) => void - >"show" : "show" - >showRename : (x: number) => string - >v => v.toString() : (v: number) => string -@@= skipped -15, +15 lines =@@ - >nested : Show - } - function ff({ nested = { show: v => v.toString() } }: Nested) {} -->ff : ({ nested }: Nested) => void -+>ff : ({ nested = { show: v => v.toString() } }: Nested) => void - >nested : Show - >{ show: v => v.toString() } : { show: (v: number) => string; } - >show : (v: number) => string -@@= skipped -16, +16 lines =@@ - >prop : [string, number] - } - function g({ prop = ["hello", 1234] }: Tuples) {} -->g : ({ prop }: Tuples) => void -+>g : ({ prop = ["hello", 1234] }: Tuples) => void - >prop : [string, number] - >["hello", 1234] : [string, number] - >"hello" : "hello" -@@= skipped -11, +11 lines =@@ - >prop : "bar" | "foo" - } - function h({ prop = "foo" }: StringUnion) {} -->h : ({ prop }: StringUnion) => void -+>h : ({ prop = "foo" }: StringUnion) => void - >prop : "bar" | "foo" - >"foo" : "foo" diff --git a/testdata/baselines/reference/submodule/conformance/contextuallyTypedBindingInitializerNegative.types b/testdata/baselines/reference/submodule/conformance/contextuallyTypedBindingInitializerNegative.types index fccdf1e42b..cc02a8e8fc 100644 --- a/testdata/baselines/reference/submodule/conformance/contextuallyTypedBindingInitializerNegative.types +++ b/testdata/baselines/reference/submodule/conformance/contextuallyTypedBindingInitializerNegative.types @@ -7,7 +7,7 @@ interface Show { >x : number } function f({ show: showRename = v => v }: Show) {} ->f : ({ show: showRename = v => v }: Show) => void +>f : ({ show: showRename }: Show) => void >show : any >showRename : (x: number) => string >v => v : (v: number) => number @@ -15,14 +15,14 @@ function f({ show: showRename = v => v }: Show) {} >v : number function f2({ "show": showRename = v => v }: Show) {} ->f2 : ({ "show": showRename = v => v }: Show) => void +>f2 : ({ "show": showRename }: Show) => void >showRename : (x: number) => string >v => v : (v: number) => number >v : number >v : number function f3({ ["show"]: showRename = v => v }: Show) {} ->f3 : ({ ["show"]: showRename = v => v }: Show) => void +>f3 : ({ ["show"]: showRename }: Show) => void >"show" : "show" >showRename : (x: number) => string >v => v : (v: number) => number @@ -34,7 +34,7 @@ interface Nested { >nested : Show } function ff({ nested: nestedRename = { show: v => v } }: Nested) {} ->ff : ({ nested: nestedRename = { show: v => v } }: Nested) => void +>ff : ({ nested: nestedRename }: Nested) => void >nested : any >nestedRename : Show >{ show: v => v } : { show: (v: number) => number; } @@ -67,7 +67,7 @@ interface Tuples { >prop : [string, number] } function g({ prop = [101, 1234] }: Tuples) {} ->g : ({ prop = [101, 1234] }: Tuples) => void +>g : ({ prop }: Tuples) => void >prop : [string, number] >[101, 1234] : [number, number] >101 : 101 @@ -78,7 +78,7 @@ interface StringUnion { >prop : "bar" | "foo" } function h({ prop = "baz" }: StringUnion) {} ->h : ({ prop = "baz" }: StringUnion) => void +>h : ({ prop }: StringUnion) => void >prop : "bar" | "foo" >"baz" : "baz" diff --git a/testdata/baselines/reference/submodule/conformance/contextuallyTypedBindingInitializerNegative.types.diff b/testdata/baselines/reference/submodule/conformance/contextuallyTypedBindingInitializerNegative.types.diff deleted file mode 100644 index 3cd1b7828d..0000000000 --- a/testdata/baselines/reference/submodule/conformance/contextuallyTypedBindingInitializerNegative.types.diff +++ /dev/null @@ -1,54 +0,0 @@ ---- old.contextuallyTypedBindingInitializerNegative.types -+++ new.contextuallyTypedBindingInitializerNegative.types -@@= skipped -6, +6 lines =@@ - >x : number - } - function f({ show: showRename = v => v }: Show) {} -->f : ({ show: showRename }: Show) => void -+>f : ({ show: showRename = v => v }: Show) => void - >show : any - >showRename : (x: number) => string - >v => v : (v: number) => number -@@= skipped -8, +8 lines =@@ - >v : number - - function f2({ "show": showRename = v => v }: Show) {} -->f2 : ({ "show": showRename }: Show) => void -+>f2 : ({ "show": showRename = v => v }: Show) => void - >showRename : (x: number) => string - >v => v : (v: number) => number - >v : number - >v : number - - function f3({ ["show"]: showRename = v => v }: Show) {} -->f3 : ({ ["show"]: showRename }: Show) => void -+>f3 : ({ ["show"]: showRename = v => v }: Show) => void - >"show" : "show" - >showRename : (x: number) => string - >v => v : (v: number) => number -@@= skipped -19, +19 lines =@@ - >nested : Show - } - function ff({ nested: nestedRename = { show: v => v } }: Nested) {} -->ff : ({ nested: nestedRename }: Nested) => void -+>ff : ({ nested: nestedRename = { show: v => v } }: Nested) => void - >nested : any - >nestedRename : Show - >{ show: v => v } : { show: (v: number) => number; } -@@= skipped -33, +33 lines =@@ - >prop : [string, number] - } - function g({ prop = [101, 1234] }: Tuples) {} -->g : ({ prop }: Tuples) => void -+>g : ({ prop = [101, 1234] }: Tuples) => void - >prop : [string, number] - >[101, 1234] : [number, number] - >101 : 101 -@@= skipped -11, +11 lines =@@ - >prop : "bar" | "foo" - } - function h({ prop = "baz" }: StringUnion) {} -->h : ({ prop }: StringUnion) => void -+>h : ({ prop = "baz" }: StringUnion) => void - >prop : "bar" | "foo" - >"baz" : "baz" diff --git a/testdata/baselines/reference/submodule/conformance/contextuallyTypedIife.types b/testdata/baselines/reference/submodule/conformance/contextuallyTypedIife.types index e1be6775eb..6f772fffcf 100644 --- a/testdata/baselines/reference/submodule/conformance/contextuallyTypedIife.types +++ b/testdata/baselines/reference/submodule/conformance/contextuallyTypedIife.types @@ -187,8 +187,8 @@ (({ p = 14 }) => p)({ p : 15 }); >(({ p = 14 }) => p)({ p : 15 }) : number ->(({ p = 14 }) => p) : ({ p = 14 }: { p: number; }) => number ->({ p = 14 }) => p : ({ p = 14 }: { p: number; }) => number +>(({ p = 14 }) => p) : ({ p }: { p: number; }) => number +>({ p = 14 }) => p : ({ p }: { p: number; }) => number >p : number >14 : 14 >p : number @@ -198,8 +198,8 @@ (({ r = 17 } = { r: 18 }) => r)({r : 19}); >(({ r = 17 } = { r: 18 }) => r)({r : 19}) : number ->(({ r = 17 } = { r: 18 }) => r) : ({ r = 17 }?: { r: number; }) => number ->({ r = 17 } = { r: 18 }) => r : ({ r = 17 }?: { r: number; }) => number +>(({ r = 17 } = { r: 18 }) => r) : ({ r }?: { r: number; }) => number +>({ r = 17 } = { r: 18 }) => r : ({ r }?: { r: number; }) => number >r : number >17 : 17 >{ r: 18 } : { r: number; } @@ -212,8 +212,8 @@ (({ u = 22 } = { u: 23 }) => u)(); >(({ u = 22 } = { u: 23 }) => u)() : number ->(({ u = 22 } = { u: 23 }) => u) : ({ u = 22 }?: { u?: number; }) => number ->({ u = 22 } = { u: 23 }) => u : ({ u = 22 }?: { u?: number; }) => number +>(({ u = 22 } = { u: 23 }) => u) : ({ u }?: { u?: number; }) => number +>({ u = 22 } = { u: 23 }) => u : ({ u }?: { u?: number; }) => number >u : number >22 : 22 >{ u: 23 } : { u?: number; } diff --git a/testdata/baselines/reference/submodule/conformance/contextuallyTypedIife.types.diff b/testdata/baselines/reference/submodule/conformance/contextuallyTypedIife.types.diff deleted file mode 100644 index 16ba7ea1f9..0000000000 --- a/testdata/baselines/reference/submodule/conformance/contextuallyTypedIife.types.diff +++ /dev/null @@ -1,35 +0,0 @@ ---- old.contextuallyTypedIife.types -+++ new.contextuallyTypedIife.types -@@= skipped -186, +186 lines =@@ - - (({ p = 14 }) => p)({ p : 15 }); - >(({ p = 14 }) => p)({ p : 15 }) : number -->(({ p = 14 }) => p) : ({ p }: { p: number; }) => number -->({ p = 14 }) => p : ({ p }: { p: number; }) => number -+>(({ p = 14 }) => p) : ({ p = 14 }: { p: number; }) => number -+>({ p = 14 }) => p : ({ p = 14 }: { p: number; }) => number - >p : number - >14 : 14 - >p : number -@@= skipped -11, +11 lines =@@ - - (({ r = 17 } = { r: 18 }) => r)({r : 19}); - >(({ r = 17 } = { r: 18 }) => r)({r : 19}) : number -->(({ r = 17 } = { r: 18 }) => r) : ({ r }?: { r: number; }) => number -->({ r = 17 } = { r: 18 }) => r : ({ r }?: { r: number; }) => number -+>(({ r = 17 } = { r: 18 }) => r) : ({ r = 17 }?: { r: number; }) => number -+>({ r = 17 } = { r: 18 }) => r : ({ r = 17 }?: { r: number; }) => number - >r : number - >17 : 17 - >{ r: 18 } : { r: number; } -@@= skipped -14, +14 lines =@@ - - (({ u = 22 } = { u: 23 }) => u)(); - >(({ u = 22 } = { u: 23 }) => u)() : number -->(({ u = 22 } = { u: 23 }) => u) : ({ u }?: { u?: number; }) => number -->({ u = 22 } = { u: 23 }) => u : ({ u }?: { u?: number; }) => number -+>(({ u = 22 } = { u: 23 }) => u) : ({ u = 22 }?: { u?: number; }) => number -+>({ u = 22 } = { u: 23 }) => u : ({ u = 22 }?: { u?: number; }) => number - >u : number - >22 : 22 - >{ u: 23 } : { u?: number; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/contextuallyTypedIifeStrict.types b/testdata/baselines/reference/submodule/conformance/contextuallyTypedIifeStrict.types index 3bbcf7b474..b124927c31 100644 --- a/testdata/baselines/reference/submodule/conformance/contextuallyTypedIifeStrict.types +++ b/testdata/baselines/reference/submodule/conformance/contextuallyTypedIifeStrict.types @@ -187,8 +187,8 @@ (({ p = 14 }) => p)({ p : 15 }); >(({ p = 14 }) => p)({ p : 15 }) : number ->(({ p = 14 }) => p) : ({ p = 14 }: { p: number; }) => number ->({ p = 14 }) => p : ({ p = 14 }: { p: number; }) => number +>(({ p = 14 }) => p) : ({ p }: { p: number; }) => number +>({ p = 14 }) => p : ({ p }: { p: number; }) => number >p : number >14 : 14 >p : number @@ -198,8 +198,8 @@ (({ r = 17 } = { r: 18 }) => r)({r : 19}); >(({ r = 17 } = { r: 18 }) => r)({r : 19}) : number ->(({ r = 17 } = { r: 18 }) => r) : ({ r = 17 }?: { r: number; }) => number ->({ r = 17 } = { r: 18 }) => r : ({ r = 17 }?: { r: number; }) => number +>(({ r = 17 } = { r: 18 }) => r) : ({ r }?: { r: number; }) => number +>({ r = 17 } = { r: 18 }) => r : ({ r }?: { r: number; }) => number >r : number >17 : 17 >{ r: 18 } : { r: number; } @@ -212,8 +212,8 @@ (({ u = 22 } = { u: 23 }) => u)(); >(({ u = 22 } = { u: 23 }) => u)() : number ->(({ u = 22 } = { u: 23 }) => u) : ({ u = 22 }?: { u?: number; }) => number ->({ u = 22 } = { u: 23 }) => u : ({ u = 22 }?: { u?: number; }) => number +>(({ u = 22 } = { u: 23 }) => u) : ({ u }?: { u?: number; }) => number +>({ u = 22 } = { u: 23 }) => u : ({ u }?: { u?: number; }) => number >u : number >22 : 22 >{ u: 23 } : { u?: number; } diff --git a/testdata/baselines/reference/submodule/conformance/contextuallyTypedIifeStrict.types.diff b/testdata/baselines/reference/submodule/conformance/contextuallyTypedIifeStrict.types.diff deleted file mode 100644 index 83f4d72b7a..0000000000 --- a/testdata/baselines/reference/submodule/conformance/contextuallyTypedIifeStrict.types.diff +++ /dev/null @@ -1,35 +0,0 @@ ---- old.contextuallyTypedIifeStrict.types -+++ new.contextuallyTypedIifeStrict.types -@@= skipped -186, +186 lines =@@ - - (({ p = 14 }) => p)({ p : 15 }); - >(({ p = 14 }) => p)({ p : 15 }) : number -->(({ p = 14 }) => p) : ({ p }: { p: number; }) => number -->({ p = 14 }) => p : ({ p }: { p: number; }) => number -+>(({ p = 14 }) => p) : ({ p = 14 }: { p: number; }) => number -+>({ p = 14 }) => p : ({ p = 14 }: { p: number; }) => number - >p : number - >14 : 14 - >p : number -@@= skipped -11, +11 lines =@@ - - (({ r = 17 } = { r: 18 }) => r)({r : 19}); - >(({ r = 17 } = { r: 18 }) => r)({r : 19}) : number -->(({ r = 17 } = { r: 18 }) => r) : ({ r }?: { r: number; }) => number -->({ r = 17 } = { r: 18 }) => r : ({ r }?: { r: number; }) => number -+>(({ r = 17 } = { r: 18 }) => r) : ({ r = 17 }?: { r: number; }) => number -+>({ r = 17 } = { r: 18 }) => r : ({ r = 17 }?: { r: number; }) => number - >r : number - >17 : 17 - >{ r: 18 } : { r: number; } -@@= skipped -14, +14 lines =@@ - - (({ u = 22 } = { u: 23 }) => u)(); - >(({ u = 22 } = { u: 23 }) => u)() : number -->(({ u = 22 } = { u: 23 }) => u) : ({ u }?: { u?: number; }) => number -->({ u = 22 } = { u: 23 }) => u : ({ u }?: { u?: number; }) => number -+>(({ u = 22 } = { u: 23 }) => u) : ({ u = 22 }?: { u?: number; }) => number -+>({ u = 22 } = { u: 23 }) => u : ({ u = 22 }?: { u?: number; }) => number - >u : number - >22 : 22 - >{ u: 23 } : { u?: number; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/declarationsAndAssignments.types b/testdata/baselines/reference/submodule/conformance/declarationsAndAssignments.types index 800fc97e20..61cc40f135 100644 --- a/testdata/baselines/reference/submodule/conformance/declarationsAndAssignments.types +++ b/testdata/baselines/reference/submodule/conformance/declarationsAndAssignments.types @@ -417,7 +417,7 @@ function f13() { } function f14([a = 1, [b = "hello", { x, y: c = false }]]) { ->f14 : ([a = 1, [b = "hello", { x, y: c = false }]]: [number, [string, { x: any; y?: boolean; }]]) => void +>f14 : ([a, [b, { x, y: c }]]: [number, [string, { x: any; y?: boolean; }]]) => void >a : number >1 : 1 >b : string @@ -438,7 +438,7 @@ function f14([a = 1, [b = "hello", { x, y: c = false }]]) { } f14([2, ["abc", { x: 0, y: true }]]); >f14([2, ["abc", { x: 0, y: true }]]) : void ->f14 : ([a = 1, [b = "hello", { x, y: c = false }]]: [number, [string, { x: any; y?: boolean; }]]) => void +>f14 : ([a, [b, { x, y: c }]]: [number, [string, { x: any; y?: boolean; }]]) => void >[2, ["abc", { x: 0, y: true }]] : [number, [string, { x: number; y: true; }]] >2 : 2 >["abc", { x: 0, y: true }] : [string, { x: number; y: true; }] @@ -451,7 +451,7 @@ f14([2, ["abc", { x: 0, y: true }]]); f14([2, ["abc", { x: 0 }]]); >f14([2, ["abc", { x: 0 }]]) : void ->f14 : ([a = 1, [b = "hello", { x, y: c = false }]]: [number, [string, { x: any; y?: boolean; }]]) => void +>f14 : ([a, [b, { x, y: c }]]: [number, [string, { x: any; y?: boolean; }]]) => void >[2, ["abc", { x: 0 }]] : [number, [string, { x: number; }]] >2 : 2 >["abc", { x: 0 }] : [string, { x: number; }] @@ -462,7 +462,7 @@ f14([2, ["abc", { x: 0 }]]); f14([2, ["abc", { y: false }]]); // Error, no x >f14([2, ["abc", { y: false }]]) : void ->f14 : ([a = 1, [b = "hello", { x, y: c = false }]]: [number, [string, { x: any; y?: boolean; }]]) => void +>f14 : ([a, [b, { x, y: c }]]: [number, [string, { x: any; y?: boolean; }]]) => void >[2, ["abc", { y: false }]] : [number, [string, { y: false; }]] >2 : 2 >["abc", { y: false }] : [string, { y: false; }] @@ -516,7 +516,7 @@ function f16() { } function f17({ a = "", b = 0, c = false }) { ->f17 : ({ a = "", b = 0, c = false }: { a?: string; b?: number; c?: boolean; }) => void +>f17 : ({ a, b, c }: { a?: string; b?: number; c?: boolean; }) => void >a : string >"" : "" >b : number @@ -527,26 +527,26 @@ function f17({ a = "", b = 0, c = false }) { f17({}); >f17({}) : void ->f17 : ({ a = "", b = 0, c = false }: { a?: string; b?: number; c?: boolean; }) => void +>f17 : ({ a, b, c }: { a?: string; b?: number; c?: boolean; }) => void >{} : {} f17({ a: "hello" }); >f17({ a: "hello" }) : void ->f17 : ({ a = "", b = 0, c = false }: { a?: string; b?: number; c?: boolean; }) => void +>f17 : ({ a, b, c }: { a?: string; b?: number; c?: boolean; }) => void >{ a: "hello" } : { a: string; } >a : string >"hello" : "hello" f17({ c: true }); >f17({ c: true }) : void ->f17 : ({ a = "", b = 0, c = false }: { a?: string; b?: number; c?: boolean; }) => void +>f17 : ({ a, b, c }: { a?: string; b?: number; c?: boolean; }) => void >{ c: true } : { c: true; } >c : true >true : true f17(f15()); >f17(f15()) : void ->f17 : ({ a = "", b = 0, c = false }: { a?: string; b?: number; c?: boolean; }) => void +>f17 : ({ a, b, c }: { a?: string; b?: number; c?: boolean; }) => void >f15() : { a: string; b: number; c: boolean; } >f15 : () => { a: string; b: number; c: boolean; } diff --git a/testdata/baselines/reference/submodule/conformance/declarationsAndAssignments.types.diff b/testdata/baselines/reference/submodule/conformance/declarationsAndAssignments.types.diff deleted file mode 100644 index 23856601d8..0000000000 --- a/testdata/baselines/reference/submodule/conformance/declarationsAndAssignments.types.diff +++ /dev/null @@ -1,77 +0,0 @@ ---- old.declarationsAndAssignments.types -+++ new.declarationsAndAssignments.types -@@= skipped -416, +416 lines =@@ - } - - function f14([a = 1, [b = "hello", { x, y: c = false }]]) { -->f14 : ([a, [b, { x, y: c }]]: [number, [string, { x: any; y?: boolean; }]]) => void -+>f14 : ([a = 1, [b = "hello", { x, y: c = false }]]: [number, [string, { x: any; y?: boolean; }]]) => void - >a : number - >1 : 1 - >b : string -@@= skipped -21, +21 lines =@@ - } - f14([2, ["abc", { x: 0, y: true }]]); - >f14([2, ["abc", { x: 0, y: true }]]) : void -->f14 : ([a, [b, { x, y: c }]]: [number, [string, { x: any; y?: boolean; }]]) => void -+>f14 : ([a = 1, [b = "hello", { x, y: c = false }]]: [number, [string, { x: any; y?: boolean; }]]) => void - >[2, ["abc", { x: 0, y: true }]] : [number, [string, { x: number; y: true; }]] - >2 : 2 - >["abc", { x: 0, y: true }] : [string, { x: number; y: true; }] -@@= skipped -13, +13 lines =@@ - - f14([2, ["abc", { x: 0 }]]); - >f14([2, ["abc", { x: 0 }]]) : void -->f14 : ([a, [b, { x, y: c }]]: [number, [string, { x: any; y?: boolean; }]]) => void -+>f14 : ([a = 1, [b = "hello", { x, y: c = false }]]: [number, [string, { x: any; y?: boolean; }]]) => void - >[2, ["abc", { x: 0 }]] : [number, [string, { x: number; }]] - >2 : 2 - >["abc", { x: 0 }] : [string, { x: number; }] -@@= skipped -11, +11 lines =@@ - - f14([2, ["abc", { y: false }]]); // Error, no x - >f14([2, ["abc", { y: false }]]) : void -->f14 : ([a, [b, { x, y: c }]]: [number, [string, { x: any; y?: boolean; }]]) => void -+>f14 : ([a = 1, [b = "hello", { x, y: c = false }]]: [number, [string, { x: any; y?: boolean; }]]) => void - >[2, ["abc", { y: false }]] : [number, [string, { y: false; }]] - >2 : 2 - >["abc", { y: false }] : [string, { y: false; }] -@@= skipped -54, +54 lines =@@ - } - - function f17({ a = "", b = 0, c = false }) { -->f17 : ({ a, b, c }: { a?: string; b?: number; c?: boolean; }) => void -+>f17 : ({ a = "", b = 0, c = false }: { a?: string; b?: number; c?: boolean; }) => void - >a : string - >"" : "" - >b : number -@@= skipped -11, +11 lines =@@ - - f17({}); - >f17({}) : void -->f17 : ({ a, b, c }: { a?: string; b?: number; c?: boolean; }) => void -+>f17 : ({ a = "", b = 0, c = false }: { a?: string; b?: number; c?: boolean; }) => void - >{} : {} - - f17({ a: "hello" }); - >f17({ a: "hello" }) : void -->f17 : ({ a, b, c }: { a?: string; b?: number; c?: boolean; }) => void -+>f17 : ({ a = "", b = 0, c = false }: { a?: string; b?: number; c?: boolean; }) => void - >{ a: "hello" } : { a: string; } - >a : string - >"hello" : "hello" - - f17({ c: true }); - >f17({ c: true }) : void -->f17 : ({ a, b, c }: { a?: string; b?: number; c?: boolean; }) => void -+>f17 : ({ a = "", b = 0, c = false }: { a?: string; b?: number; c?: boolean; }) => void - >{ c: true } : { c: true; } - >c : true - >true : true - - f17(f15()); - >f17(f15()) : void -->f17 : ({ a, b, c }: { a?: string; b?: number; c?: boolean; }) => void -+>f17 : ({ a = "", b = 0, c = false }: { a?: string; b?: number; c?: boolean; }) => void - >f15() : { a: string; b: number; c: boolean; } - >f15 : () => { a: string; b: number; c: boolean; } diff --git a/testdata/baselines/reference/submodule/conformance/dependentDestructuredVariables.types b/testdata/baselines/reference/submodule/conformance/dependentDestructuredVariables.types index c6975b3886..6c3010adca 100644 --- a/testdata/baselines/reference/submodule/conformance/dependentDestructuredVariables.types +++ b/testdata/baselines/reference/submodule/conformance/dependentDestructuredVariables.types @@ -957,7 +957,7 @@ const f60: Func = (kind, payload) => { // Repro from #48902 function foo({ ->foo : ({ value1, test1 = value1.test1, test2 = value1.test2, test3 = value1.test3, test4 = value1.test4, test5 = value1.test5, test6 = value1.test6, test7 = value1.test7, test8 = value1.test8, test9 = value1.test9 }: { test1?: any; test2?: any; test3?: any; test4?: any; test5?: any; test6?: any; test7?: any; test8?: any; test9?: any; value1: any; }) => void +>foo : ({ value1, test1, test2, test3, test4, test5, test6, test7, test8, test9 }: { test1?: any; test2?: any; test3?: any; test4?: any; test5?: any; test6?: any; test7?: any; test8?: any; test9?: any; value1: any; }) => void value1, >value1 : any diff --git a/testdata/baselines/reference/submodule/conformance/dependentDestructuredVariables.types.diff b/testdata/baselines/reference/submodule/conformance/dependentDestructuredVariables.types.diff index c00831922e..e5e012d366 100644 --- a/testdata/baselines/reference/submodule/conformance/dependentDestructuredVariables.types.diff +++ b/testdata/baselines/reference/submodule/conformance/dependentDestructuredVariables.types.diff @@ -241,16 +241,7 @@ } if (kind === "b") { >kind === "b" : boolean -@@= skipped -20, +20 lines =@@ - // Repro from #48902 - - function foo({ -->foo : ({ value1, test1, test2, test3, test4, test5, test6, test7, test8, test9 }: { test1?: any; test2?: any; test3?: any; test4?: any; test5?: any; test6?: any; test7?: any; test8?: any; test9?: any; value1: any; }) => void -+>foo : ({ value1, test1 = value1.test1, test2 = value1.test2, test3 = value1.test3, test4 = value1.test4, test5 = value1.test5, test6 = value1.test6, test7 = value1.test7, test8 = value1.test8, test9 = value1.test9 }: { test1?: any; test2?: any; test3?: any; test4?: any; test5?: any; test6?: any; test7?: any; test8?: any; test9?: any; value1: any; }) => void - - value1, - >value1 : any -@@= skipped -64, +64 lines =@@ +@@= skipped -84, +84 lines =@@ // Repro from #49772 function fa1(x: [true, number] | [false, string]) { diff --git a/testdata/baselines/reference/submodule/conformance/destructuringArrayBindingPatternAndAssignment3.types b/testdata/baselines/reference/submodule/conformance/destructuringArrayBindingPatternAndAssignment3.types index e78b0bdda0..85d5a6799b 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringArrayBindingPatternAndAssignment3.types +++ b/testdata/baselines/reference/submodule/conformance/destructuringArrayBindingPatternAndAssignment3.types @@ -30,8 +30,8 @@ const [f, g = f, h = i, i = f] = [1]; // error for h = i (function ([a, b = a]) { // ok >(function ([a, b = a]) { // ok})([1]) : void ->(function ([a, b = a]) { // ok}) : ([a, b = a]: number[]) => void ->function ([a, b = a]) { // ok} : ([a, b = a]: number[]) => void +>(function ([a, b = a]) { // ok}) : ([a, b]: number[]) => void +>function ([a, b = a]) { // ok} : ([a, b]: number[]) => void >a : number >b : number >a : number @@ -42,8 +42,8 @@ const [f, g = f, h = i, i = f] = [1]; // error for h = i (function ([c, d = c, e = e]) { // error for e = e >(function ([c, d = c, e = e]) { // error for e = e})([1]) : void ->(function ([c, d = c, e = e]) { // error for e = e}) : ([c, d = c, e = e]: number[]) => void ->function ([c, d = c, e = e]) { // error for e = e} : ([c, d = c, e = e]: number[]) => void +>(function ([c, d = c, e = e]) { // error for e = e}) : ([c, d, e]: number[]) => void +>function ([c, d = c, e = e]) { // error for e = e} : ([c, d, e]: number[]) => void >c : number >d : number >c : number @@ -56,8 +56,8 @@ const [f, g = f, h = i, i = f] = [1]; // error for h = i (function ([f, g = f, h = i, i = f]) { // error for h = i >(function ([f, g = f, h = i, i = f]) { // error for h = i})([1]) : void ->(function ([f, g = f, h = i, i = f]) { // error for h = i}) : ([f, g = f, h = i, i = f]: number[]) => void ->function ([f, g = f, h = i, i = f]) { // error for h = i} : ([f, g = f, h = i, i = f]: number[]) => void +>(function ([f, g = f, h = i, i = f]) { // error for h = i}) : ([f, g, h, i]: number[]) => void +>function ([f, g = f, h = i, i = f]) { // error for h = i} : ([f, g, h, i]: number[]) => void >f : number >g : number >f : number diff --git a/testdata/baselines/reference/submodule/conformance/destructuringArrayBindingPatternAndAssignment3.types.diff b/testdata/baselines/reference/submodule/conformance/destructuringArrayBindingPatternAndAssignment3.types.diff deleted file mode 100644 index 9742f4fc5f..0000000000 --- a/testdata/baselines/reference/submodule/conformance/destructuringArrayBindingPatternAndAssignment3.types.diff +++ /dev/null @@ -1,35 +0,0 @@ ---- old.destructuringArrayBindingPatternAndAssignment3.types -+++ new.destructuringArrayBindingPatternAndAssignment3.types -@@= skipped -29, +29 lines =@@ - - (function ([a, b = a]) { // ok - >(function ([a, b = a]) { // ok})([1]) : void -->(function ([a, b = a]) { // ok}) : ([a, b]: number[]) => void -->function ([a, b = a]) { // ok} : ([a, b]: number[]) => void -+>(function ([a, b = a]) { // ok}) : ([a, b = a]: number[]) => void -+>function ([a, b = a]) { // ok} : ([a, b = a]: number[]) => void - >a : number - >b : number - >a : number -@@= skipped -12, +12 lines =@@ - - (function ([c, d = c, e = e]) { // error for e = e - >(function ([c, d = c, e = e]) { // error for e = e})([1]) : void -->(function ([c, d = c, e = e]) { // error for e = e}) : ([c, d, e]: number[]) => void -->function ([c, d = c, e = e]) { // error for e = e} : ([c, d, e]: number[]) => void -+>(function ([c, d = c, e = e]) { // error for e = e}) : ([c, d = c, e = e]: number[]) => void -+>function ([c, d = c, e = e]) { // error for e = e} : ([c, d = c, e = e]: number[]) => void - >c : number - >d : number - >c : number -@@= skipped -14, +14 lines =@@ - - (function ([f, g = f, h = i, i = f]) { // error for h = i - >(function ([f, g = f, h = i, i = f]) { // error for h = i})([1]) : void -->(function ([f, g = f, h = i, i = f]) { // error for h = i}) : ([f, g, h, i]: number[]) => void -->function ([f, g = f, h = i, i = f]) { // error for h = i} : ([f, g, h, i]: number[]) => void -+>(function ([f, g = f, h = i, i = f]) { // error for h = i}) : ([f, g = f, h = i, i = f]: number[]) => void -+>function ([f, g = f, h = i, i = f]) { // error for h = i} : ([f, g = f, h = i, i = f]: number[]) => void - >f : number - >g : number - >f : number \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration10(strict=false).types b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration10(strict=false).types index 5ef6a67829..8fae0eb8c5 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration10(strict=false).types +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration10(strict=false).types @@ -2,7 +2,7 @@ === destructuringParameterDeclaration10.ts === export function prepareConfig({ ->prepareConfig : ({ additionalFiles: { json = [] } = {} }?: { additionalFiles?: Partial>; }) => void +>prepareConfig : ({ additionalFiles: { json } }?: { additionalFiles?: Partial>; }) => void additionalFiles: { >additionalFiles : any @@ -26,7 +26,7 @@ export function prepareConfig({ } export function prepareConfigWithoutAnnotation({ ->prepareConfigWithoutAnnotation : ({ additionalFiles: { json = [] } = {} }?: { additionalFiles?: { json?: any[]; }; }) => void +>prepareConfigWithoutAnnotation : ({ additionalFiles: { json } }?: { additionalFiles?: { json?: any[]; }; }) => void additionalFiles: { >additionalFiles : any @@ -53,7 +53,7 @@ export const prepareConfigWithContextualSignature: (param:{ >additionalFiles : Partial> }) => void = ({ ->({ additionalFiles: { json = [] } = {}} = {}) => { json // string[]} : ({ additionalFiles: { json = [] } = {} }?: { additionalFiles?: Partial>; }) => void +>({ additionalFiles: { json = [] } = {}} = {}) => { json // string[]} : ({ additionalFiles: { json } }?: { additionalFiles?: Partial>; }) => void additionalFiles: { >additionalFiles : any diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration10(strict=false).types.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration10(strict=false).types.diff index e56cf38cc6..fd24639849 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration10(strict=false).types.diff +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration10(strict=false).types.diff @@ -5,20 +5,11 @@ === destructuringParameterDeclaration10.ts === export function prepareConfig({ ->prepareConfig : ({ additionalFiles: { json } }?: { additionalFiles?: Partial>; }) => void -+>prepareConfig : ({ additionalFiles: { json = [] } = {} }?: { additionalFiles?: Partial>; }) => void ++>prepareConfig : ({ additionalFiles: { json } }?: { additionalFiles?: Partial>; }) => void additionalFiles: { >additionalFiles : any -@@= skipped -24, +24 lines =@@ - } - - export function prepareConfigWithoutAnnotation({ -->prepareConfigWithoutAnnotation : ({ additionalFiles: { json } }?: { additionalFiles?: { json?: any[]; }; }) => void -+>prepareConfigWithoutAnnotation : ({ additionalFiles: { json = [] } = {} }?: { additionalFiles?: { json?: any[]; }; }) => void - - additionalFiles: { - >additionalFiles : any -@@= skipped -20, +20 lines =@@ +@@= skipped -44, +44 lines =@@ } export const prepareConfigWithContextualSignature: (param:{ @@ -32,7 +23,7 @@ }) => void = ({ ->({ additionalFiles: { json = [] } = {}} = {}) => { json // string[]} : ({ additionalFiles: { json } }?: { additionalFiles?: Partial>; }) => void -+>({ additionalFiles: { json = [] } = {}} = {}) => { json // string[]} : ({ additionalFiles: { json = [] } = {} }?: { additionalFiles?: Partial>; }) => void ++>({ additionalFiles: { json = [] } = {}} = {}) => { json // string[]} : ({ additionalFiles: { json } }?: { additionalFiles?: Partial>; }) => void additionalFiles: { >additionalFiles : any \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration10(strict=true).types b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration10(strict=true).types index e2868b96cf..ca566ffe73 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration10(strict=true).types +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration10(strict=true).types @@ -2,7 +2,7 @@ === destructuringParameterDeclaration10.ts === export function prepareConfig({ ->prepareConfig : ({ additionalFiles: { json = [] } = {} }?: { additionalFiles?: Partial> | undefined; }) => void +>prepareConfig : ({ additionalFiles: { json } }?: { additionalFiles?: Partial> | undefined; }) => void additionalFiles: { >additionalFiles : any @@ -26,7 +26,7 @@ export function prepareConfig({ } export function prepareConfigWithoutAnnotation({ ->prepareConfigWithoutAnnotation : ({ additionalFiles: { json = [] } = {} }?: { additionalFiles?: { json?: never[] | undefined; } | undefined; }) => void +>prepareConfigWithoutAnnotation : ({ additionalFiles: { json } }?: { additionalFiles?: { json?: never[] | undefined; } | undefined; }) => void additionalFiles: { >additionalFiles : any @@ -53,7 +53,7 @@ export const prepareConfigWithContextualSignature: (param:{ >additionalFiles : Partial> | undefined }) => void = ({ ->({ additionalFiles: { json = [] } = {}} = {}) => { json // string[]} : ({ additionalFiles: { json = [] } = {} }?: { additionalFiles?: Partial> | undefined; }) => void +>({ additionalFiles: { json = [] } = {}} = {}) => { json // string[]} : ({ additionalFiles: { json } }?: { additionalFiles?: Partial> | undefined; }) => void additionalFiles: { >additionalFiles : any diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration10(strict=true).types.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration10(strict=true).types.diff index ad23c34552..b0f4b772e2 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration10(strict=true).types.diff +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration10(strict=true).types.diff @@ -5,20 +5,11 @@ === destructuringParameterDeclaration10.ts === export function prepareConfig({ ->prepareConfig : ({ additionalFiles: { json } }?: { additionalFiles?: Partial>; }) => void -+>prepareConfig : ({ additionalFiles: { json = [] } = {} }?: { additionalFiles?: Partial> | undefined; }) => void ++>prepareConfig : ({ additionalFiles: { json } }?: { additionalFiles?: Partial> | undefined; }) => void additionalFiles: { >additionalFiles : any -@@= skipped -24, +24 lines =@@ - } - - export function prepareConfigWithoutAnnotation({ -->prepareConfigWithoutAnnotation : ({ additionalFiles: { json } }?: { additionalFiles?: { json?: never[] | undefined; } | undefined; }) => void -+>prepareConfigWithoutAnnotation : ({ additionalFiles: { json = [] } = {} }?: { additionalFiles?: { json?: never[] | undefined; } | undefined; }) => void - - additionalFiles: { - >additionalFiles : any -@@= skipped -20, +20 lines =@@ +@@= skipped -44, +44 lines =@@ } export const prepareConfigWithContextualSignature: (param:{ @@ -32,7 +23,7 @@ }) => void = ({ ->({ additionalFiles: { json = [] } = {}} = {}) => { json // string[]} : ({ additionalFiles: { json } }?: { additionalFiles?: Partial>; }) => void -+>({ additionalFiles: { json = [] } = {}} = {}) => { json // string[]} : ({ additionalFiles: { json = [] } = {} }?: { additionalFiles?: Partial> | undefined; }) => void ++>({ additionalFiles: { json = [] } = {}} = {}) => { json // string[]} : ({ additionalFiles: { json } }?: { additionalFiles?: Partial> | undefined; }) => void additionalFiles: { >additionalFiles : any \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5.types b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5.types index b61dbcfdfa..e41ed396db 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5.types +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5.types @@ -206,7 +206,7 @@ function c1({z} = { z: 10 }) { } >10 : 10 function c2({z = 10}) { } ->c2 : ({ z = 10 }: { z?: number; }) => void +>c2 : ({ z }: { z?: number; }) => void >z : number >10 : 10 @@ -225,7 +225,7 @@ function c5([a, b, [[c]]]) { } >c : any function c6([a, b, [[c=1]]]) { } ->c6 : ([a, b, [[c = 1]]]: [any, any, [[number?]]]) => void +>c6 : ([a, b, [[c]]]: [any, any, [[number?]]]) => void >a : any >b : any >c : number @@ -270,12 +270,12 @@ c1({ z: 1 }) // Implied type is {z:number}? c2({}); // Implied type is {z?: number} >c2({}) : void ->c2 : ({ z = 10 }: { z?: number; }) => void +>c2 : ({ z }: { z?: number; }) => void >{} : {} c2({z:1}); // Implied type is {z?: number} >c2({z:1}) : void ->c2 : ({ z = 10 }: { z?: number; }) => void +>c2 : ({ z }: { z?: number; }) => void >{z:1} : { z: number; } >z : number >1 : 1 diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5.types.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5.types.diff index 188bcca669..227d9546e5 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5.types.diff +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5.types.diff @@ -9,13 +9,7 @@ >j : number >k : string >l : any -@@= skipped -187, +187 lines =@@ - >10 : 10 - - function c2({z = 10}) { } -->c2 : ({ z }: { z?: number; }) => void -+>c2 : ({ z = 10 }: { z?: number; }) => void - >z : number +@@= skipped -192, +192 lines =@@ >10 : 10 function c3({b}: { b: number|string} = { b: "hello" }) { } @@ -24,30 +18,7 @@ >b : string | number >b : string | number >{ b: "hello" } : { b: string; } -@@= skipped -19, +19 lines =@@ - >c : any - - function c6([a, b, [[c=1]]]) { } -->c6 : ([a, b, [[c]]]: [any, any, [[number?]]]) => void -+>c6 : ([a, b, [[c = 1]]]: [any, any, [[number?]]]) => void - >a : any - >b : any - >c : number -@@= skipped -45, +45 lines =@@ - - c2({}); // Implied type is {z?: number} - >c2({}) : void -->c2 : ({ z }: { z?: number; }) => void -+>c2 : ({ z = 10 }: { z?: number; }) => void - >{} : {} - - c2({z:1}); // Implied type is {z?: number} - >c2({z:1}) : void -->c2 : ({ z }: { z?: number; }) => void -+>c2 : ({ z = 10 }: { z?: number; }) => void - >{z:1} : { z: number; } - >z : number - >1 : 1 +@@= skipped -71, +71 lines =@@ c3({ b: 1 }); // Implied type is { b: number|string }. >c3({ b: 1 }) : void diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5iterable.types b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5iterable.types index 60a0a3ec35..f710b4fd3f 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5iterable.types +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5iterable.types @@ -206,7 +206,7 @@ function c1({z} = { z: 10 }) { } >10 : 10 function c2({z = 10}) { } ->c2 : ({ z = 10 }: { z?: number; }) => void +>c2 : ({ z }: { z?: number; }) => void >z : number >10 : 10 @@ -225,7 +225,7 @@ function c5([a, b, [[c]]]) { } >c : any function c6([a, b, [[c=1]]]) { } ->c6 : ([a, b, [[c = 1]]]: [any, any, [[number?]]]) => void +>c6 : ([a, b, [[c]]]: [any, any, [[number?]]]) => void >a : any >b : any >c : number @@ -270,12 +270,12 @@ c1({ z: 1 }) // Implied type is {z:number}? c2({}); // Implied type is {z?: number} >c2({}) : void ->c2 : ({ z = 10 }: { z?: number; }) => void +>c2 : ({ z }: { z?: number; }) => void >{} : {} c2({z:1}); // Implied type is {z?: number} >c2({z:1}) : void ->c2 : ({ z = 10 }: { z?: number; }) => void +>c2 : ({ z }: { z?: number; }) => void >{z:1} : { z: number; } >z : number >1 : 1 diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5iterable.types.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5iterable.types.diff index 0b359969fc..d8681a9ea9 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5iterable.types.diff +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5iterable.types.diff @@ -9,13 +9,7 @@ >j : number >k : string >l : any -@@= skipped -187, +187 lines =@@ - >10 : 10 - - function c2({z = 10}) { } -->c2 : ({ z }: { z?: number; }) => void -+>c2 : ({ z = 10 }: { z?: number; }) => void - >z : number +@@= skipped -192, +192 lines =@@ >10 : 10 function c3({b}: { b: number|string} = { b: "hello" }) { } @@ -24,30 +18,7 @@ >b : string | number >b : string | number >{ b: "hello" } : { b: string; } -@@= skipped -19, +19 lines =@@ - >c : any - - function c6([a, b, [[c=1]]]) { } -->c6 : ([a, b, [[c]]]: [any, any, [[number?]]]) => void -+>c6 : ([a, b, [[c = 1]]]: [any, any, [[number?]]]) => void - >a : any - >b : any - >c : number -@@= skipped -45, +45 lines =@@ - - c2({}); // Implied type is {z?: number} - >c2({}) : void -->c2 : ({ z }: { z?: number; }) => void -+>c2 : ({ z = 10 }: { z?: number; }) => void - >{} : {} - - c2({z:1}); // Implied type is {z?: number} - >c2({z:1}) : void -->c2 : ({ z }: { z?: number; }) => void -+>c2 : ({ z = 10 }: { z?: number; }) => void - >{z:1} : { z: number; } - >z : number - >1 : 1 +@@= skipped -71, +71 lines =@@ c3({ b: 1 }); // Implied type is { b: number|string }. >c3({ b: 1 }) : void diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES6.types b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES6.types index ca2186a8d9..78aec3bef9 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES6.types +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES6.types @@ -189,7 +189,7 @@ function c1({z} = { z: 10 }) { } >10 : 10 function c2({z = 10}) { } ->c2 : ({ z = 10 }: { z?: number; }) => void +>c2 : ({ z }: { z?: number; }) => void >z : number >10 : 10 @@ -208,7 +208,7 @@ function c5([a, b, [[c]]]) { } >c : any function c6([a, b, [[c=1]]]) { } ->c6 : ([a, b, [[c = 1]]]: [any, any, [[number?]]]) => void +>c6 : ([a, b, [[c]]]: [any, any, [[number?]]]) => void >a : any >b : any >c : number @@ -253,12 +253,12 @@ c1({ z: 1 }) // Implied type is {z:number}? c2({}); // Implied type is {z?: number} >c2({}) : void ->c2 : ({ z = 10 }: { z?: number; }) => void +>c2 : ({ z }: { z?: number; }) => void >{} : {} c2({z:1}); // Implied type is {z?: number} >c2({z:1}) : void ->c2 : ({ z = 10 }: { z?: number; }) => void +>c2 : ({ z }: { z?: number; }) => void >{z:1} : { z: number; } >z : number >1 : 1 diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES6.types.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES6.types.diff index 471194745c..a6eaeb3136 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES6.types.diff +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES6.types.diff @@ -9,13 +9,7 @@ >j : number >k : string >l : any -@@= skipped -168, +168 lines =@@ - >10 : 10 - - function c2({z = 10}) { } -->c2 : ({ z }: { z?: number; }) => void -+>c2 : ({ z = 10 }: { z?: number; }) => void - >z : number +@@= skipped -173, +173 lines =@@ >10 : 10 function c3({b}: { b: number|string} = { b: "hello" }) { } @@ -24,30 +18,7 @@ >b : string | number >b : string | number >{ b: "hello" } : { b: string; } -@@= skipped -19, +19 lines =@@ - >c : any - - function c6([a, b, [[c=1]]]) { } -->c6 : ([a, b, [[c]]]: [any, any, [[number?]]]) => void -+>c6 : ([a, b, [[c = 1]]]: [any, any, [[number?]]]) => void - >a : any - >b : any - >c : number -@@= skipped -45, +45 lines =@@ - - c2({}); // Implied type is {z?: number} - >c2({}) : void -->c2 : ({ z }: { z?: number; }) => void -+>c2 : ({ z = 10 }: { z?: number; }) => void - >{} : {} - - c2({z:1}); // Implied type is {z?: number} - >c2({z:1}) : void -->c2 : ({ z }: { z?: number; }) => void -+>c2 : ({ z = 10 }: { z?: number; }) => void - >{z:1} : { z: number; } - >z : number - >1 : 1 +@@= skipped -71, +71 lines =@@ c3({ b: 1 }); // Implied type is { b: number|string }. >c3({ b: 1 }) : void diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration2.types b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration2.types index 9b80dbf777..8d0348db05 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration2.types +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration2.types @@ -117,7 +117,7 @@ function c1({z} = { z: 10 }) { } >10 : 10 function c2({z = 10}) { } ->c2 : ({ z = 10 }: { z?: number; }) => void +>c2 : ({ z }: { z?: number; }) => void >z : number >10 : 10 @@ -141,7 +141,7 @@ function c5([a, b, [[c]]]) { } >c : any function c6([a, b, [[c = 1]]]) { } ->c6 : ([a, b, [[c = 1]]]: [any, any, [[number?]]]) => void +>c6 : ([a, b, [[c]]]: [any, any, [[number?]]]) => void >a : any >b : any >c : number @@ -168,7 +168,7 @@ c1({ z: true }); // Error, implied type is {z:number}? c2({ z: false }); // Error, implied type is {z?: number} >c2({ z: false }) : void ->c2 : ({ z = 10 }: { z?: number; }) => void +>c2 : ({ z }: { z?: number; }) => void >{ z: false } : { z: boolean; } >z : boolean >false : false @@ -191,7 +191,7 @@ c5([1, 2, false, true]); // Error, implied type is [any, any, [[any]]] c6([1, 2, [["string"]]]); // Error, implied type is [any, any, [[number]]] // Use initializer >c6([1, 2, [["string"]]]) : void ->c6 : ([a, b, [[c = 1]]]: [any, any, [[number?]]]) => void +>c6 : ([a, b, [[c]]]: [any, any, [[number?]]]) => void >[1, 2, [["string"]]] : [number, number, [[string]]] >1 : 1 >2 : 2 diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration2.types.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration2.types.diff index 6364df6466..bce5e49f89 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration2.types.diff +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration2.types.diff @@ -1,12 +1,6 @@ --- old.destructuringParameterDeclaration2.types +++ new.destructuringParameterDeclaration2.types -@@= skipped -116, +116 lines =@@ - >10 : 10 - - function c2({z = 10}) { } -->c2 : ({ z }: { z?: number; }) => void -+>c2 : ({ z = 10 }: { z?: number; }) => void - >z : number +@@= skipped -121, +121 lines =@@ >10 : 10 function c3({b}: { b: number|string } = { b: "hello" }) { } @@ -15,24 +9,7 @@ >b : string | number >b : string | number >{ b: "hello" } : { b: string; } -@@= skipped -24, +24 lines =@@ - >c : any - - function c6([a, b, [[c = 1]]]) { } -->c6 : ([a, b, [[c]]]: [any, any, [[number?]]]) => void -+>c6 : ([a, b, [[c = 1]]]: [any, any, [[number?]]]) => void - >a : any - >b : any - >c : number -@@= skipped -27, +27 lines =@@ - - c2({ z: false }); // Error, implied type is {z?: number} - >c2({ z: false }) : void -->c2 : ({ z }: { z?: number; }) => void -+>c2 : ({ z = 10 }: { z?: number; }) => void - >{ z: false } : { z: boolean; } - >z : boolean - >false : false +@@= skipped -53, +53 lines =@@ c3({ b: true }); // Error, implied type is { b: number|string }. >c3({ b: true }) : void @@ -40,13 +17,4 @@ +>c3 : ({ b }?: { b: string | number; }) => void >{ b: true } : { b: boolean; } >b : boolean - >true : true -@@= skipped -23, +23 lines =@@ - - c6([1, 2, [["string"]]]); // Error, implied type is [any, any, [[number]]] // Use initializer - >c6([1, 2, [["string"]]]) : void -->c6 : ([a, b, [[c]]]: [any, any, [[number?]]]) => void -+>c6 : ([a, b, [[c = 1]]]: [any, any, [[number?]]]) => void - >[1, 2, [["string"]]] : [number, number, [[string]]] - >1 : 1 - >2 : 2 \ No newline at end of file + >true : true \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration8.types b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration8.types index c250c7328f..7e16ac342b 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration8.types +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration8.types @@ -4,7 +4,7 @@ // explicit type annotation should cause `method` to have type 'x' | 'y' // both inside and outside `test`. function test({ ->test : ({ method = "z", nested: { p = "c" } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void +>test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void method = 'z', >method : "x" | "y" @@ -34,12 +34,12 @@ function test({ test({}); >test({}) : void ->test : ({ method = "z", nested: { p = "c" } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void +>test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void >{} : {} test({ method: 'x', nested: { p: 'a' } }) >test({ method: 'x', nested: { p: 'a' } }) : void ->test : ({ method = "z", nested: { p = "c" } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void +>test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void >{ method: 'x', nested: { p: 'a' } } : { method: "x"; nested: { p: "a"; }; } >method : "x" >'x' : "x" @@ -50,7 +50,7 @@ test({ method: 'x', nested: { p: 'a' } }) test({ method: 'z', nested: { p: 'b' } }) >test({ method: 'z', nested: { p: 'b' } }) : void ->test : ({ method = "z", nested: { p = "c" } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void +>test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void >{ method: 'z', nested: { p: 'b' } } : { method: "z"; nested: { p: "b"; }; } >method : "z" >'z' : "z" @@ -61,7 +61,7 @@ test({ method: 'z', nested: { p: 'b' } }) test({ method: 'one', nested: { p: 'a' } }) >test({ method: 'one', nested: { p: 'a' } }) : void ->test : ({ method = "z", nested: { p = "c" } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void +>test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void >{ method: 'one', nested: { p: 'a' } } : { method: "one"; nested: { p: "a"; }; } >method : "one" >'one' : "one" diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration8.types.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration8.types.diff deleted file mode 100644 index 951cbbd6e5..0000000000 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration8.types.diff +++ /dev/null @@ -1,44 +0,0 @@ ---- old.destructuringParameterDeclaration8.types -+++ new.destructuringParameterDeclaration8.types -@@= skipped -3, +3 lines =@@ - // explicit type annotation should cause `method` to have type 'x' | 'y' - // both inside and outside `test`. - function test({ -->test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void -+>test : ({ method = "z", nested: { p = "c" } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void - - method = 'z', - >method : "x" | "y" -@@= skipped -30, +30 lines =@@ - - test({}); - >test({}) : void -->test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void -+>test : ({ method = "z", nested: { p = "c" } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void - >{} : {} - - test({ method: 'x', nested: { p: 'a' } }) - >test({ method: 'x', nested: { p: 'a' } }) : void -->test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void -+>test : ({ method = "z", nested: { p = "c" } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void - >{ method: 'x', nested: { p: 'a' } } : { method: "x"; nested: { p: "a"; }; } - >method : "x" - >'x' : "x" -@@= skipped -16, +16 lines =@@ - - test({ method: 'z', nested: { p: 'b' } }) - >test({ method: 'z', nested: { p: 'b' } }) : void -->test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void -+>test : ({ method = "z", nested: { p = "c" } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void - >{ method: 'z', nested: { p: 'b' } } : { method: "z"; nested: { p: "b"; }; } - >method : "z" - >'z' : "z" -@@= skipped -11, +11 lines =@@ - - test({ method: 'one', nested: { p: 'a' } }) - >test({ method: 'one', nested: { p: 'a' } }) : void -->test : ({ method, nested: { p } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void -+>test : ({ method = "z", nested: { p = "c" } }: { method?: "x" | "y"; nested?: { p: "a" | "b"; }; }) => void - >{ method: 'one', nested: { p: 'a' } } : { method: "one"; nested: { p: "a"; }; } - >method : "one" - >'one' : "one" \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration9(strict=false).types b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration9(strict=false).types index 2274ec9340..36ac06a198 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration9(strict=false).types +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration9(strict=false).types @@ -6,7 +6,7 @@ * @param {Partial>} [config.additionalFiles] */ export function prepareConfig({ ->prepareConfig : ({ additionalFiles: { json = [] } = {} }?: { additionalFiles?: { json?: any[]; }; }) => void +>prepareConfig : ({ additionalFiles: { json } }?: { additionalFiles?: { json?: any[]; }; }) => void additionalFiles: { >additionalFiles : any @@ -26,7 +26,7 @@ export function prepareConfig({ } export function prepareConfigWithoutAnnotation({ ->prepareConfigWithoutAnnotation : ({ additionalFiles: { json = [] } = {} }?: { additionalFiles?: { json?: any[]; }; }) => void +>prepareConfigWithoutAnnotation : ({ additionalFiles: { json } }?: { additionalFiles?: { json?: any[]; }; }) => void additionalFiles: { >additionalFiles : any @@ -50,7 +50,7 @@ export function prepareConfigWithoutAnnotation({ }) => void} */ export const prepareConfigWithContextualSignature = ({ >prepareConfigWithContextualSignature : (param: { additionalFiles?: Partial>; }) => void ->({ additionalFiles: { json = [] } = {}} = {})=> { json // string[]} : ({ additionalFiles: { json = [] } = {} }?: { additionalFiles?: Partial>; }) => void +>({ additionalFiles: { json = [] } = {}} = {})=> { json // string[]} : ({ additionalFiles: { json } }?: { additionalFiles?: Partial>; }) => void additionalFiles: { >additionalFiles : any @@ -75,7 +75,7 @@ export const prepareConfigWithContextualSignature = ({ * @param {{ a?: { json?: string[] }}} [config] */ function f1({ a: { json = [] } = {} } = {}) { return json } ->f1 : ({ a: { json = [] } = {} }?: { a?: { json?: any[]; }; }) => any[] +>f1 : ({ a: { json } }?: { a?: { json?: any[]; }; }) => any[] >a : any >json : any[] >[] : undefined[] @@ -87,7 +87,7 @@ function f1({ a: { json = [] } = {} } = {}) { return json } * @param {[[string[]?]?]} [x] */ function f2([[json = []] = []] = []) { return json } ->f2 : ([[json = []] = []]?: [[any[]?]?]) => any[] +>f2 : ([[json]]?: [[any[]?]?]) => any[] >json : any[] >[] : undefined[] >[] : [] diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration9(strict=true).types b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration9(strict=true).types index 58bd568e1c..d91371d03a 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration9(strict=true).types +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration9(strict=true).types @@ -6,7 +6,7 @@ * @param {Partial>} [config.additionalFiles] */ export function prepareConfig({ ->prepareConfig : ({ additionalFiles: { json = [] } = {} }?: { additionalFiles?: { json?: never[] | undefined; } | undefined; }) => void +>prepareConfig : ({ additionalFiles: { json } }?: { additionalFiles?: { json?: never[] | undefined; } | undefined; }) => void additionalFiles: { >additionalFiles : any @@ -26,7 +26,7 @@ export function prepareConfig({ } export function prepareConfigWithoutAnnotation({ ->prepareConfigWithoutAnnotation : ({ additionalFiles: { json = [] } = {} }?: { additionalFiles?: { json?: never[] | undefined; } | undefined; }) => void +>prepareConfigWithoutAnnotation : ({ additionalFiles: { json } }?: { additionalFiles?: { json?: never[] | undefined; } | undefined; }) => void additionalFiles: { >additionalFiles : any @@ -50,7 +50,7 @@ export function prepareConfigWithoutAnnotation({ }) => void} */ export const prepareConfigWithContextualSignature = ({ >prepareConfigWithContextualSignature : (param: { additionalFiles?: Partial> | undefined; }) => void ->({ additionalFiles: { json = [] } = {}} = {})=> { json // string[]} : ({ additionalFiles: { json = [] } = {} }?: { additionalFiles?: Partial> | undefined; }) => void +>({ additionalFiles: { json = [] } = {}} = {})=> { json // string[]} : ({ additionalFiles: { json } }?: { additionalFiles?: Partial> | undefined; }) => void additionalFiles: { >additionalFiles : any @@ -75,7 +75,7 @@ export const prepareConfigWithContextualSignature = ({ * @param {{ a?: { json?: string[] }}} [config] */ function f1({ a: { json = [] } = {} } = {}) { return json } ->f1 : ({ a: { json = [] } = {} }?: { a?: { json?: never[] | undefined; } | undefined; }) => never[] +>f1 : ({ a: { json } }?: { a?: { json?: never[] | undefined; } | undefined; }) => never[] >a : any >json : never[] >[] : never[] @@ -87,7 +87,7 @@ function f1({ a: { json = [] } = {} } = {}) { return json } * @param {[[string[]?]?]} [x] */ function f2([[json = []] = []] = []) { return json } ->f2 : ([[json = []] = []]?: [([(never[] | undefined)?] | undefined)?]) => never[] +>f2 : ([[json]]?: [([(never[] | undefined)?] | undefined)?]) => never[] >json : never[] >[] : never[] >[] : [] diff --git a/testdata/baselines/reference/submodule/conformance/destructuringWithLiteralInitializers.types b/testdata/baselines/reference/submodule/conformance/destructuringWithLiteralInitializers.types index 8c30c70a50..d46ab82876 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringWithLiteralInitializers.types +++ b/testdata/baselines/reference/submodule/conformance/destructuringWithLiteralInitializers.types @@ -18,21 +18,21 @@ f1({ x: 1, y: 1 }); // (arg: { x: any, y?: number }) => void function f2({ x, y = 0 }) { } ->f2 : ({ x, y = 0 }: { x: any; y?: number; }) => void +>f2 : ({ x, y }: { x: any; y?: number; }) => void >x : any >y : number >0 : 0 f2({ x: 1 }); >f2({ x: 1 }) : void ->f2 : ({ x, y = 0 }: { x: any; y?: number; }) => void +>f2 : ({ x, y }: { x: any; y?: number; }) => void >{ x: 1 } : { x: number; } >x : number >1 : 1 f2({ x: 1, y: 1 }); >f2({ x: 1, y: 1 }) : void ->f2 : ({ x, y = 0 }: { x: any; y?: number; }) => void +>f2 : ({ x, y }: { x: any; y?: number; }) => void >{ x: 1, y: 1 } : { x: number; y: number; } >x : number >1 : 1 @@ -41,7 +41,7 @@ f2({ x: 1, y: 1 }); // (arg: { x?: number, y?: number }) => void function f3({ x = 0, y = 0 }) { } ->f3 : ({ x = 0, y = 0 }: { x?: number; y?: number; }) => void +>f3 : ({ x, y }: { x?: number; y?: number; }) => void >x : number >0 : 0 >y : number @@ -49,26 +49,26 @@ function f3({ x = 0, y = 0 }) { } f3({}); >f3({}) : void ->f3 : ({ x = 0, y = 0 }: { x?: number; y?: number; }) => void +>f3 : ({ x, y }: { x?: number; y?: number; }) => void >{} : {} f3({ x: 1 }); >f3({ x: 1 }) : void ->f3 : ({ x = 0, y = 0 }: { x?: number; y?: number; }) => void +>f3 : ({ x, y }: { x?: number; y?: number; }) => void >{ x: 1 } : { x: number; } >x : number >1 : 1 f3({ y: 1 }); >f3({ y: 1 }) : void ->f3 : ({ x = 0, y = 0 }: { x?: number; y?: number; }) => void +>f3 : ({ x, y }: { x?: number; y?: number; }) => void >{ y: 1 } : { y: number; } >y : number >1 : 1 f3({ x: 1, y: 1 }); >f3({ x: 1, y: 1 }) : void ->f3 : ({ x = 0, y = 0 }: { x?: number; y?: number; }) => void +>f3 : ({ x, y }: { x?: number; y?: number; }) => void >{ x: 1, y: 1 } : { x: number; y: number; } >x : number >1 : 1 @@ -101,7 +101,7 @@ f4({ x: 1, y: 1 }); // (arg?: { x: number, y?: number }) => void function f5({ x, y = 0 } = { x: 0 }) { } ->f5 : ({ x, y = 0 }?: { x: number; y?: number; }) => void +>f5 : ({ x, y }?: { x: number; y?: number; }) => void >x : number >y : number >0 : 0 @@ -111,18 +111,18 @@ function f5({ x, y = 0 } = { x: 0 }) { } f5(); >f5() : void ->f5 : ({ x, y = 0 }?: { x: number; y?: number; }) => void +>f5 : ({ x, y }?: { x: number; y?: number; }) => void f5({ x: 1 }); >f5({ x: 1 }) : void ->f5 : ({ x, y = 0 }?: { x: number; y?: number; }) => void +>f5 : ({ x, y }?: { x: number; y?: number; }) => void >{ x: 1 } : { x: number; } >x : number >1 : 1 f5({ x: 1, y: 1 }); >f5({ x: 1, y: 1 }) : void ->f5 : ({ x, y = 0 }?: { x: number; y?: number; }) => void +>f5 : ({ x, y }?: { x: number; y?: number; }) => void >{ x: 1, y: 1 } : { x: number; y: number; } >x : number >1 : 1 @@ -131,7 +131,7 @@ f5({ x: 1, y: 1 }); // (arg?: { x?: number, y?: number }) => void function f6({ x = 0, y = 0 } = {}) { } ->f6 : ({ x = 0, y = 0 }?: { x?: number; y?: number; }) => void +>f6 : ({ x, y }?: { x?: number; y?: number; }) => void >x : number >0 : 0 >y : number @@ -140,30 +140,30 @@ function f6({ x = 0, y = 0 } = {}) { } f6(); >f6() : void ->f6 : ({ x = 0, y = 0 }?: { x?: number; y?: number; }) => void +>f6 : ({ x, y }?: { x?: number; y?: number; }) => void f6({}); >f6({}) : void ->f6 : ({ x = 0, y = 0 }?: { x?: number; y?: number; }) => void +>f6 : ({ x, y }?: { x?: number; y?: number; }) => void >{} : {} f6({ x: 1 }); >f6({ x: 1 }) : void ->f6 : ({ x = 0, y = 0 }?: { x?: number; y?: number; }) => void +>f6 : ({ x, y }?: { x?: number; y?: number; }) => void >{ x: 1 } : { x: number; } >x : number >1 : 1 f6({ y: 1 }); >f6({ y: 1 }) : void ->f6 : ({ x = 0, y = 0 }?: { x?: number; y?: number; }) => void +>f6 : ({ x, y }?: { x?: number; y?: number; }) => void >{ y: 1 } : { y: number; } >y : number >1 : 1 f6({ x: 1, y: 1 }); >f6({ x: 1, y: 1 }) : void ->f6 : ({ x = 0, y = 0 }?: { x?: number; y?: number; }) => void +>f6 : ({ x, y }?: { x?: number; y?: number; }) => void >{ x: 1, y: 1 } : { x: number; y: number; } >x : number >1 : 1 @@ -172,7 +172,7 @@ f6({ x: 1, y: 1 }); // (arg?: { a: { x?: number, y?: number } }) => void function f7({ a: { x = 0, y = 0 } } = { a: {} }) { } ->f7 : ({ a: { x = 0, y = 0 } }?: { a: {}; }) => void +>f7 : ({ a: { x, y } }?: { a: {}; }) => void >a : any >x : number >0 : 0 @@ -184,18 +184,18 @@ function f7({ a: { x = 0, y = 0 } } = { a: {} }) { } f7(); >f7() : void ->f7 : ({ a: { x = 0, y = 0 } }?: { a: {}; }) => void +>f7 : ({ a: { x, y } }?: { a: {}; }) => void f7({ a: {} }); >f7({ a: {} }) : void ->f7 : ({ a: { x = 0, y = 0 } }?: { a: {}; }) => void +>f7 : ({ a: { x, y } }?: { a: {}; }) => void >{ a: {} } : { a: {}; } >a : {} >{} : {} f7({ a: { x: 1 } }); >f7({ a: { x: 1 } }) : void ->f7 : ({ a: { x = 0, y = 0 } }?: { a: {}; }) => void +>f7 : ({ a: { x, y } }?: { a: {}; }) => void >{ a: { x: 1 } } : { a: { x: number; }; } >a : { x: number; } >{ x: 1 } : { x: number; } @@ -204,7 +204,7 @@ f7({ a: { x: 1 } }); f7({ a: { y: 1 } }); >f7({ a: { y: 1 } }) : void ->f7 : ({ a: { x = 0, y = 0 } }?: { a: {}; }) => void +>f7 : ({ a: { x, y } }?: { a: {}; }) => void >{ a: { y: 1 } } : { a: { y: number; }; } >a : { y: number; } >{ y: 1 } : { y: number; } @@ -213,7 +213,7 @@ f7({ a: { y: 1 } }); f7({ a: { x: 1, y: 1 } }); >f7({ a: { x: 1, y: 1 } }) : void ->f7 : ({ a: { x = 0, y = 0 } }?: { a: {}; }) => void +>f7 : ({ a: { x, y } }?: { a: {}; }) => void >{ a: { x: 1, y: 1 } } : { a: { x: number; y: number; }; } >a : { x: number; y: number; } >{ x: 1, y: 1 } : { x: number; y: number; } @@ -237,7 +237,7 @@ g1([1, 1]); // (arg: [number, number]) => void function g2([x = 0, y = 0]) { } ->g2 : ([x = 0, y = 0]: [number?, number?]) => void +>g2 : ([x, y]: [number?, number?]) => void >x : number >0 : 0 >y : number @@ -245,7 +245,7 @@ function g2([x = 0, y = 0]) { } g2([1, 1]); >g2([1, 1]) : void ->g2 : ([x = 0, y = 0]: [number?, number?]) => void +>g2 : ([x, y]: [number?, number?]) => void >[1, 1] : [number, number] >1 : 1 >1 : 1 @@ -272,7 +272,7 @@ g3([1, 1]); // (arg?: [number, number]) => void function g4([x, y = 0] = [0]) { } ->g4 : ([x, y = 0]?: [number, number?]) => void +>g4 : ([x, y]?: [number, number?]) => void >x : number >y : number >0 : 0 @@ -281,18 +281,18 @@ function g4([x, y = 0] = [0]) { } g4(); >g4() : void ->g4 : ([x, y = 0]?: [number, number?]) => void +>g4 : ([x, y]?: [number, number?]) => void g4([1, 1]); >g4([1, 1]) : void ->g4 : ([x, y = 0]?: [number, number?]) => void +>g4 : ([x, y]?: [number, number?]) => void >[1, 1] : [number, number] >1 : 1 >1 : 1 // (arg?: [number, number]) => void function g5([x = 0, y = 0] = []) { } ->g5 : ([x = 0, y = 0]?: [number?, number?]) => void +>g5 : ([x, y]?: [number?, number?]) => void >x : number >0 : 0 >y : number @@ -301,11 +301,11 @@ function g5([x = 0, y = 0] = []) { } g5(); >g5() : void ->g5 : ([x = 0, y = 0]?: [number?, number?]) => void +>g5 : ([x, y]?: [number?, number?]) => void g5([1, 1]); >g5([1, 1]) : void ->g5 : ([x = 0, y = 0]?: [number?, number?]) => void +>g5 : ([x, y]?: [number?, number?]) => void >[1, 1] : [number, number] >1 : 1 >1 : 1 diff --git a/testdata/baselines/reference/submodule/conformance/destructuringWithLiteralInitializers.types.diff b/testdata/baselines/reference/submodule/conformance/destructuringWithLiteralInitializers.types.diff deleted file mode 100644 index eb27ffdc85..0000000000 --- a/testdata/baselines/reference/submodule/conformance/destructuringWithLiteralInitializers.types.diff +++ /dev/null @@ -1,255 +0,0 @@ ---- old.destructuringWithLiteralInitializers.types -+++ new.destructuringWithLiteralInitializers.types -@@= skipped -17, +17 lines =@@ - - // (arg: { x: any, y?: number }) => void - function f2({ x, y = 0 }) { } -->f2 : ({ x, y }: { x: any; y?: number; }) => void -+>f2 : ({ x, y = 0 }: { x: any; y?: number; }) => void - >x : any - >y : number - >0 : 0 - - f2({ x: 1 }); - >f2({ x: 1 }) : void -->f2 : ({ x, y }: { x: any; y?: number; }) => void -+>f2 : ({ x, y = 0 }: { x: any; y?: number; }) => void - >{ x: 1 } : { x: number; } - >x : number - >1 : 1 - - f2({ x: 1, y: 1 }); - >f2({ x: 1, y: 1 }) : void -->f2 : ({ x, y }: { x: any; y?: number; }) => void -+>f2 : ({ x, y = 0 }: { x: any; y?: number; }) => void - >{ x: 1, y: 1 } : { x: number; y: number; } - >x : number - >1 : 1 -@@= skipped -23, +23 lines =@@ - - // (arg: { x?: number, y?: number }) => void - function f3({ x = 0, y = 0 }) { } -->f3 : ({ x, y }: { x?: number; y?: number; }) => void -+>f3 : ({ x = 0, y = 0 }: { x?: number; y?: number; }) => void - >x : number - >0 : 0 - >y : number -@@= skipped -8, +8 lines =@@ - - f3({}); - >f3({}) : void -->f3 : ({ x, y }: { x?: number; y?: number; }) => void -+>f3 : ({ x = 0, y = 0 }: { x?: number; y?: number; }) => void - >{} : {} - - f3({ x: 1 }); - >f3({ x: 1 }) : void -->f3 : ({ x, y }: { x?: number; y?: number; }) => void -+>f3 : ({ x = 0, y = 0 }: { x?: number; y?: number; }) => void - >{ x: 1 } : { x: number; } - >x : number - >1 : 1 - - f3({ y: 1 }); - >f3({ y: 1 }) : void -->f3 : ({ x, y }: { x?: number; y?: number; }) => void -+>f3 : ({ x = 0, y = 0 }: { x?: number; y?: number; }) => void - >{ y: 1 } : { y: number; } - >y : number - >1 : 1 - - f3({ x: 1, y: 1 }); - >f3({ x: 1, y: 1 }) : void -->f3 : ({ x, y }: { x?: number; y?: number; }) => void -+>f3 : ({ x = 0, y = 0 }: { x?: number; y?: number; }) => void - >{ x: 1, y: 1 } : { x: number; y: number; } - >x : number - >1 : 1 -@@= skipped -52, +52 lines =@@ - - // (arg?: { x: number, y?: number }) => void - function f5({ x, y = 0 } = { x: 0 }) { } -->f5 : ({ x, y }?: { x: number; y?: number; }) => void -+>f5 : ({ x, y = 0 }?: { x: number; y?: number; }) => void - >x : number - >y : number - >0 : 0 -@@= skipped -10, +10 lines =@@ - - f5(); - >f5() : void -->f5 : ({ x, y }?: { x: number; y?: number; }) => void -+>f5 : ({ x, y = 0 }?: { x: number; y?: number; }) => void - - f5({ x: 1 }); - >f5({ x: 1 }) : void -->f5 : ({ x, y }?: { x: number; y?: number; }) => void -+>f5 : ({ x, y = 0 }?: { x: number; y?: number; }) => void - >{ x: 1 } : { x: number; } - >x : number - >1 : 1 - - f5({ x: 1, y: 1 }); - >f5({ x: 1, y: 1 }) : void -->f5 : ({ x, y }?: { x: number; y?: number; }) => void -+>f5 : ({ x, y = 0 }?: { x: number; y?: number; }) => void - >{ x: 1, y: 1 } : { x: number; y: number; } - >x : number - >1 : 1 -@@= skipped -20, +20 lines =@@ - - // (arg?: { x?: number, y?: number }) => void - function f6({ x = 0, y = 0 } = {}) { } -->f6 : ({ x, y }?: { x?: number; y?: number; }) => void -+>f6 : ({ x = 0, y = 0 }?: { x?: number; y?: number; }) => void - >x : number - >0 : 0 - >y : number -@@= skipped -9, +9 lines =@@ - - f6(); - >f6() : void -->f6 : ({ x, y }?: { x?: number; y?: number; }) => void -+>f6 : ({ x = 0, y = 0 }?: { x?: number; y?: number; }) => void - - f6({}); - >f6({}) : void -->f6 : ({ x, y }?: { x?: number; y?: number; }) => void -+>f6 : ({ x = 0, y = 0 }?: { x?: number; y?: number; }) => void - >{} : {} - - f6({ x: 1 }); - >f6({ x: 1 }) : void -->f6 : ({ x, y }?: { x?: number; y?: number; }) => void -+>f6 : ({ x = 0, y = 0 }?: { x?: number; y?: number; }) => void - >{ x: 1 } : { x: number; } - >x : number - >1 : 1 - - f6({ y: 1 }); - >f6({ y: 1 }) : void -->f6 : ({ x, y }?: { x?: number; y?: number; }) => void -+>f6 : ({ x = 0, y = 0 }?: { x?: number; y?: number; }) => void - >{ y: 1 } : { y: number; } - >y : number - >1 : 1 - - f6({ x: 1, y: 1 }); - >f6({ x: 1, y: 1 }) : void -->f6 : ({ x, y }?: { x?: number; y?: number; }) => void -+>f6 : ({ x = 0, y = 0 }?: { x?: number; y?: number; }) => void - >{ x: 1, y: 1 } : { x: number; y: number; } - >x : number - >1 : 1 -@@= skipped -32, +32 lines =@@ - - // (arg?: { a: { x?: number, y?: number } }) => void - function f7({ a: { x = 0, y = 0 } } = { a: {} }) { } -->f7 : ({ a: { x, y } }?: { a: {}; }) => void -+>f7 : ({ a: { x = 0, y = 0 } }?: { a: {}; }) => void - >a : any - >x : number - >0 : 0 -@@= skipped -12, +12 lines =@@ - - f7(); - >f7() : void -->f7 : ({ a: { x, y } }?: { a: {}; }) => void -+>f7 : ({ a: { x = 0, y = 0 } }?: { a: {}; }) => void - - f7({ a: {} }); - >f7({ a: {} }) : void -->f7 : ({ a: { x, y } }?: { a: {}; }) => void -+>f7 : ({ a: { x = 0, y = 0 } }?: { a: {}; }) => void - >{ a: {} } : { a: {}; } - >a : {} - >{} : {} - - f7({ a: { x: 1 } }); - >f7({ a: { x: 1 } }) : void -->f7 : ({ a: { x, y } }?: { a: {}; }) => void -+>f7 : ({ a: { x = 0, y = 0 } }?: { a: {}; }) => void - >{ a: { x: 1 } } : { a: { x: number; }; } - >a : { x: number; } - >{ x: 1 } : { x: number; } -@@= skipped -20, +20 lines =@@ - - f7({ a: { y: 1 } }); - >f7({ a: { y: 1 } }) : void -->f7 : ({ a: { x, y } }?: { a: {}; }) => void -+>f7 : ({ a: { x = 0, y = 0 } }?: { a: {}; }) => void - >{ a: { y: 1 } } : { a: { y: number; }; } - >a : { y: number; } - >{ y: 1 } : { y: number; } -@@= skipped -9, +9 lines =@@ - - f7({ a: { x: 1, y: 1 } }); - >f7({ a: { x: 1, y: 1 } }) : void -->f7 : ({ a: { x, y } }?: { a: {}; }) => void -+>f7 : ({ a: { x = 0, y = 0 } }?: { a: {}; }) => void - >{ a: { x: 1, y: 1 } } : { a: { x: number; y: number; }; } - >a : { x: number; y: number; } - >{ x: 1, y: 1 } : { x: number; y: number; } -@@= skipped -24, +24 lines =@@ - - // (arg: [number, number]) => void - function g2([x = 0, y = 0]) { } -->g2 : ([x, y]: [number?, number?]) => void -+>g2 : ([x = 0, y = 0]: [number?, number?]) => void - >x : number - >0 : 0 - >y : number -@@= skipped -8, +8 lines =@@ - - g2([1, 1]); - >g2([1, 1]) : void -->g2 : ([x, y]: [number?, number?]) => void -+>g2 : ([x = 0, y = 0]: [number?, number?]) => void - >[1, 1] : [number, number] - >1 : 1 - >1 : 1 -@@= skipped -27, +27 lines =@@ - - // (arg?: [number, number]) => void - function g4([x, y = 0] = [0]) { } -->g4 : ([x, y]?: [number, number?]) => void -+>g4 : ([x, y = 0]?: [number, number?]) => void - >x : number - >y : number - >0 : 0 -@@= skipped -9, +9 lines =@@ - - g4(); - >g4() : void -->g4 : ([x, y]?: [number, number?]) => void -+>g4 : ([x, y = 0]?: [number, number?]) => void - - g4([1, 1]); - >g4([1, 1]) : void -->g4 : ([x, y]?: [number, number?]) => void -+>g4 : ([x, y = 0]?: [number, number?]) => void - >[1, 1] : [number, number] - >1 : 1 - >1 : 1 - - // (arg?: [number, number]) => void - function g5([x = 0, y = 0] = []) { } -->g5 : ([x, y]?: [number?, number?]) => void -+>g5 : ([x = 0, y = 0]?: [number?, number?]) => void - >x : number - >0 : 0 - >y : number -@@= skipped -20, +20 lines =@@ - - g5(); - >g5() : void -->g5 : ([x, y]?: [number?, number?]) => void -+>g5 : ([x = 0, y = 0]?: [number?, number?]) => void - - g5([1, 1]); - >g5([1, 1]) : void -->g5 : ([x, y]?: [number?, number?]) => void -+>g5 : ([x = 0, y = 0]?: [number?, number?]) => void - >[1, 1] : [number, number] - >1 : 1 - >1 : 1 \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/destructuringWithLiteralInitializers2.types b/testdata/baselines/reference/submodule/conformance/destructuringWithLiteralInitializers2.types index 1fb9b91f91..e6474ff385 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringWithLiteralInitializers2.types +++ b/testdata/baselines/reference/submodule/conformance/destructuringWithLiteralInitializers2.types @@ -28,20 +28,20 @@ function f03([x, y] = [1, 'foo']) {} >'foo' : "foo" function f10([x = 0, y]) {} ->f10 : ([x = 0, y]: [number | undefined, any]) => void +>f10 : ([x, y]: [number | undefined, any]) => void >x : number >0 : 0 >y : any function f11([x = 0, y] = []) {} ->f11 : ([x = 0, y]?: [(number | undefined)?, any?]) => void +>f11 : ([x, y]?: [(number | undefined)?, any?]) => void >x : number >0 : 0 >y : any >[] : [] function f12([x = 0, y] = [1]) {} ->f12 : ([x = 0, y]?: [number, any?]) => void +>f12 : ([x, y]?: [number, any?]) => void >x : number >0 : 0 >y : any @@ -49,7 +49,7 @@ function f12([x = 0, y] = [1]) {} >1 : 1 function f13([x = 0, y] = [1, 'foo']) {} ->f13 : ([x = 0, y]?: [number, string]) => void +>f13 : ([x, y]?: [number, string]) => void >x : number >0 : 0 >y : string @@ -58,14 +58,14 @@ function f13([x = 0, y] = [1, 'foo']) {} >'foo' : "foo" function f20([x = 0, y = 'bar']) {} ->f20 : ([x = 0, y = "bar"]: [(number | undefined)?, (string | undefined)?]) => void +>f20 : ([x, y]: [(number | undefined)?, (string | undefined)?]) => void >x : number >0 : 0 >y : string >'bar' : "bar" function f21([x = 0, y = 'bar'] = []) {} ->f21 : ([x = 0, y = "bar"]?: [(number | undefined)?, (string | undefined)?]) => void +>f21 : ([x, y]?: [(number | undefined)?, (string | undefined)?]) => void >x : number >0 : 0 >y : string @@ -73,7 +73,7 @@ function f21([x = 0, y = 'bar'] = []) {} >[] : [] function f22([x = 0, y = 'bar'] = [1]) {} ->f22 : ([x = 0, y = "bar"]?: [number, (string | undefined)?]) => void +>f22 : ([x, y]?: [number, (string | undefined)?]) => void >x : number >0 : 0 >y : string @@ -82,7 +82,7 @@ function f22([x = 0, y = 'bar'] = [1]) {} >1 : 1 function f23([x = 0, y = 'bar'] = [1, 'foo']) {} ->f23 : ([x = 0, y = "bar"]?: [number, string]) => void +>f23 : ([x, y]?: [number, string]) => void >x : number >0 : 0 >y : string @@ -98,14 +98,14 @@ declare const sx: string | undefined; >sx : string | undefined function f30([x = 0, y = 'bar']) {} ->f30 : ([x = 0, y = "bar"]: [(number | undefined)?, (string | undefined)?]) => void +>f30 : ([x, y]: [(number | undefined)?, (string | undefined)?]) => void >x : number >0 : 0 >y : string >'bar' : "bar" function f31([x = 0, y = 'bar'] = []) {} ->f31 : ([x = 0, y = "bar"]?: [(number | undefined)?, (string | undefined)?]) => void +>f31 : ([x, y]?: [(number | undefined)?, (string | undefined)?]) => void >x : number >0 : 0 >y : string @@ -113,7 +113,7 @@ function f31([x = 0, y = 'bar'] = []) {} >[] : [] function f32([x = 0, y = 'bar'] = [nx]) {} ->f32 : ([x = 0, y = "bar"]?: [number | undefined, (string | undefined)?]) => void +>f32 : ([x, y]?: [number | undefined, (string | undefined)?]) => void >x : number >0 : 0 >y : string @@ -122,7 +122,7 @@ function f32([x = 0, y = 'bar'] = [nx]) {} >nx : number | undefined function f33([x = 0, y = 'bar'] = [nx, sx]) {} ->f33 : ([x = 0, y = "bar"]?: [number | undefined, string | undefined]) => void +>f33 : ([x, y]?: [number | undefined, string | undefined]) => void >x : number >0 : 0 >y : string @@ -132,14 +132,14 @@ function f33([x = 0, y = 'bar'] = [nx, sx]) {} >sx : string | undefined function f40([x = 0, y = 'bar']) {} ->f40 : ([x = 0, y = "bar"]: [(number | undefined)?, (string | undefined)?]) => void +>f40 : ([x, y]: [(number | undefined)?, (string | undefined)?]) => void >x : number >0 : 0 >y : string >'bar' : "bar" function f41([x = 0, y = 'bar'] = []) {} ->f41 : ([x = 0, y = "bar"]?: [(number | undefined)?, (string | undefined)?]) => void +>f41 : ([x, y]?: [(number | undefined)?, (string | undefined)?]) => void >x : number >0 : 0 >y : string @@ -147,7 +147,7 @@ function f41([x = 0, y = 'bar'] = []) {} >[] : [] function f42([x = 0, y = 'bar'] = [sx]) {} ->f42 : ([x = 0, y = "bar"]?: [string | undefined, (string | undefined)?]) => void +>f42 : ([x, y]?: [string | undefined, (string | undefined)?]) => void >x : string | number >0 : 0 >y : string @@ -156,7 +156,7 @@ function f42([x = 0, y = 'bar'] = [sx]) {} >sx : string | undefined function f43([x = 0, y = 'bar'] = [sx, nx]) {} ->f43 : ([x = 0, y = "bar"]?: [string | undefined, number | undefined]) => void +>f43 : ([x, y]?: [string | undefined, number | undefined]) => void >x : string | number >0 : 0 >y : string | number diff --git a/testdata/baselines/reference/submodule/conformance/destructuringWithLiteralInitializers2.types.diff b/testdata/baselines/reference/submodule/conformance/destructuringWithLiteralInitializers2.types.diff deleted file mode 100644 index a13390e905..0000000000 --- a/testdata/baselines/reference/submodule/conformance/destructuringWithLiteralInitializers2.types.diff +++ /dev/null @@ -1,140 +0,0 @@ ---- old.destructuringWithLiteralInitializers2.types -+++ new.destructuringWithLiteralInitializers2.types -@@= skipped -27, +27 lines =@@ - >'foo' : "foo" - - function f10([x = 0, y]) {} -->f10 : ([x, y]: [number | undefined, any]) => void -+>f10 : ([x = 0, y]: [number | undefined, any]) => void - >x : number - >0 : 0 - >y : any - - function f11([x = 0, y] = []) {} -->f11 : ([x, y]?: [(number | undefined)?, any?]) => void -+>f11 : ([x = 0, y]?: [(number | undefined)?, any?]) => void - >x : number - >0 : 0 - >y : any - >[] : [] - - function f12([x = 0, y] = [1]) {} -->f12 : ([x, y]?: [number, any?]) => void -+>f12 : ([x = 0, y]?: [number, any?]) => void - >x : number - >0 : 0 - >y : any -@@= skipped -21, +21 lines =@@ - >1 : 1 - - function f13([x = 0, y] = [1, 'foo']) {} -->f13 : ([x, y]?: [number, string]) => void -+>f13 : ([x = 0, y]?: [number, string]) => void - >x : number - >0 : 0 - >y : string -@@= skipped -9, +9 lines =@@ - >'foo' : "foo" - - function f20([x = 0, y = 'bar']) {} -->f20 : ([x, y]: [(number | undefined)?, (string | undefined)?]) => void -+>f20 : ([x = 0, y = "bar"]: [(number | undefined)?, (string | undefined)?]) => void - >x : number - >0 : 0 - >y : string - >'bar' : "bar" - - function f21([x = 0, y = 'bar'] = []) {} -->f21 : ([x, y]?: [(number | undefined)?, (string | undefined)?]) => void -+>f21 : ([x = 0, y = "bar"]?: [(number | undefined)?, (string | undefined)?]) => void - >x : number - >0 : 0 - >y : string -@@= skipped -15, +15 lines =@@ - >[] : [] - - function f22([x = 0, y = 'bar'] = [1]) {} -->f22 : ([x, y]?: [number, (string | undefined)?]) => void -+>f22 : ([x = 0, y = "bar"]?: [number, (string | undefined)?]) => void - >x : number - >0 : 0 - >y : string -@@= skipped -9, +9 lines =@@ - >1 : 1 - - function f23([x = 0, y = 'bar'] = [1, 'foo']) {} -->f23 : ([x, y]?: [number, string]) => void -+>f23 : ([x = 0, y = "bar"]?: [number, string]) => void - >x : number - >0 : 0 - >y : string -@@= skipped -16, +16 lines =@@ - >sx : string | undefined - - function f30([x = 0, y = 'bar']) {} -->f30 : ([x, y]: [(number | undefined)?, (string | undefined)?]) => void -+>f30 : ([x = 0, y = "bar"]: [(number | undefined)?, (string | undefined)?]) => void - >x : number - >0 : 0 - >y : string - >'bar' : "bar" - - function f31([x = 0, y = 'bar'] = []) {} -->f31 : ([x, y]?: [(number | undefined)?, (string | undefined)?]) => void -+>f31 : ([x = 0, y = "bar"]?: [(number | undefined)?, (string | undefined)?]) => void - >x : number - >0 : 0 - >y : string -@@= skipped -15, +15 lines =@@ - >[] : [] - - function f32([x = 0, y = 'bar'] = [nx]) {} -->f32 : ([x, y]?: [number | undefined, (string | undefined)?]) => void -+>f32 : ([x = 0, y = "bar"]?: [number | undefined, (string | undefined)?]) => void - >x : number - >0 : 0 - >y : string -@@= skipped -9, +9 lines =@@ - >nx : number | undefined - - function f33([x = 0, y = 'bar'] = [nx, sx]) {} -->f33 : ([x, y]?: [number | undefined, string | undefined]) => void -+>f33 : ([x = 0, y = "bar"]?: [number | undefined, string | undefined]) => void - >x : number - >0 : 0 - >y : string -@@= skipped -10, +10 lines =@@ - >sx : string | undefined - - function f40([x = 0, y = 'bar']) {} -->f40 : ([x, y]: [(number | undefined)?, (string | undefined)?]) => void -+>f40 : ([x = 0, y = "bar"]: [(number | undefined)?, (string | undefined)?]) => void - >x : number - >0 : 0 - >y : string - >'bar' : "bar" - - function f41([x = 0, y = 'bar'] = []) {} -->f41 : ([x, y]?: [(number | undefined)?, (string | undefined)?]) => void -+>f41 : ([x = 0, y = "bar"]?: [(number | undefined)?, (string | undefined)?]) => void - >x : number - >0 : 0 - >y : string -@@= skipped -15, +15 lines =@@ - >[] : [] - - function f42([x = 0, y = 'bar'] = [sx]) {} -->f42 : ([x, y]?: [string | undefined, (string | undefined)?]) => void -+>f42 : ([x = 0, y = "bar"]?: [string | undefined, (string | undefined)?]) => void - >x : string | number - >0 : 0 - >y : string -@@= skipped -9, +9 lines =@@ - >sx : string | undefined - - function f43([x = 0, y = 'bar'] = [sx, nx]) {} -->f43 : ([x, y]?: [string | undefined, number | undefined]) => void -+>f43 : ([x = 0, y = "bar"]?: [string | undefined, number | undefined]) => void - >x : string | number - >0 : 0 - >y : string | number \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionES6.types b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionES6.types index 3cd1732170..13ae150758 100644 --- a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionES6.types +++ b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionES6.types @@ -64,8 +64,8 @@ var p4 = ([, ...a]) => { }; >a : any[] var p5 = ([a = 1]) => { }; ->p5 : ([a = 1]: [number?]) => void ->([a = 1]) => { } : ([a = 1]: [number?]) => void +>p5 : ([a]: [number?]) => void +>([a = 1]) => { } : ([a]: [number?]) => void >a : number >1 : 1 @@ -81,14 +81,14 @@ var p7 = ({ a: { b } }) => { }; >b : any var p8 = ({ a = 1 }) => { }; ->p8 : ({ a = 1 }: { a?: number; }) => void ->({ a = 1 }) => { } : ({ a = 1 }: { a?: number; }) => void +>p8 : ({ a }: { a?: number; }) => void +>({ a = 1 }) => { } : ({ a }: { a?: number; }) => void >a : number >1 : 1 var p9 = ({ a: { b = 1 } = { b: 1 } }) => { }; ->p9 : ({ a: { b = 1 } = { b: 1 } }: { a?: { b?: number; }; }) => void ->({ a: { b = 1 } = { b: 1 } }) => { } : ({ a: { b = 1 } = { b: 1 } }: { a?: { b?: number; }; }) => void +>p9 : ({ a: { b } }: { a?: { b?: number; }; }) => void +>({ a: { b = 1 } = { b: 1 } }) => { } : ({ a: { b } }: { a?: { b?: number; }; }) => void >a : any >b : number >1 : 1 diff --git a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionES6.types.diff b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionES6.types.diff deleted file mode 100644 index b7818acff6..0000000000 --- a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionES6.types.diff +++ /dev/null @@ -1,32 +0,0 @@ ---- old.emitArrowFunctionES6.types -+++ new.emitArrowFunctionES6.types -@@= skipped -63, +63 lines =@@ - >a : any[] - - var p5 = ([a = 1]) => { }; -->p5 : ([a]: [number?]) => void -->([a = 1]) => { } : ([a]: [number?]) => void -+>p5 : ([a = 1]: [number?]) => void -+>([a = 1]) => { } : ([a = 1]: [number?]) => void - >a : number - >1 : 1 - -@@= skipped -17, +17 lines =@@ - >b : any - - var p8 = ({ a = 1 }) => { }; -->p8 : ({ a }: { a?: number; }) => void -->({ a = 1 }) => { } : ({ a }: { a?: number; }) => void -+>p8 : ({ a = 1 }: { a?: number; }) => void -+>({ a = 1 }) => { } : ({ a = 1 }: { a?: number; }) => void - >a : number - >1 : 1 - - var p9 = ({ a: { b = 1 } = { b: 1 } }) => { }; -->p9 : ({ a: { b } }: { a?: { b?: number; }; }) => void -->({ a: { b = 1 } = { b: 1 } }) => { } : ({ a: { b } }: { a?: { b?: number; }; }) => void -+>p9 : ({ a: { b = 1 } = { b: 1 } }: { a?: { b?: number; }; }) => void -+>({ a: { b = 1 } = { b: 1 } }) => { } : ({ a: { b = 1 } = { b: 1 } }: { a?: { b?: number; }; }) => void - >a : any - >b : number - >1 : 1 \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns01_ES5.types b/testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns01_ES5.types index 762e12656e..aeee33be75 100644 --- a/testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns01_ES5.types +++ b/testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns01_ES5.types @@ -63,7 +63,7 @@ } function f({} = a, [] = a, { p: {} = a} = a) { ->f : ({}?: any, []?: any, { p: {} = a }?: any) => ({}?: any, []?: any, { p: {} = a }?: any) => any +>f : ({}?: any, []?: any, { p: {} }?: any) => ({}?: any, []?: any, { p: {} }?: any) => any >a : any >a : any >p : any @@ -71,7 +71,7 @@ >a : any return ({} = a, [] = a, { p: {} = a } = a) => a; ->({} = a, [] = a, { p: {} = a } = a) => a : ({}?: any, []?: any, { p: {} = a }?: any) => any +>({} = a, [] = a, { p: {} = a } = a) => a : ({}?: any, []?: any, { p: {} }?: any) => any >a : any >a : any >p : any diff --git a/testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns01_ES5.types.diff b/testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns01_ES5.types.diff deleted file mode 100644 index 4c2f0ab287..0000000000 --- a/testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns01_ES5.types.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.emptyVariableDeclarationBindingPatterns01_ES5.types -+++ new.emptyVariableDeclarationBindingPatterns01_ES5.types -@@= skipped -62, +62 lines =@@ - } - - function f({} = a, [] = a, { p: {} = a} = a) { -->f : ({}?: any, []?: any, { p: {} }?: any) => ({}?: any, []?: any, { p: {} }?: any) => any -+>f : ({}?: any, []?: any, { p: {} = a }?: any) => ({}?: any, []?: any, { p: {} = a }?: any) => any - >a : any - >a : any - >p : any -@@= skipped -8, +8 lines =@@ - >a : any - - return ({} = a, [] = a, { p: {} = a } = a) => a; -->({} = a, [] = a, { p: {} = a } = a) => a : ({}?: any, []?: any, { p: {} }?: any) => any -+>({} = a, [] = a, { p: {} = a } = a) => a : ({}?: any, []?: any, { p: {} = a }?: any) => any - >a : any - >a : any - >p : any \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns01_ES5iterable.types b/testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns01_ES5iterable.types index c10bc2aa80..88c8144022 100644 --- a/testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns01_ES5iterable.types +++ b/testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns01_ES5iterable.types @@ -63,7 +63,7 @@ } function f({} = a, [] = a, { p: {} = a} = a) { ->f : ({}?: any, []?: any, { p: {} = a }?: any) => ({}?: any, []?: any, { p: {} = a }?: any) => any +>f : ({}?: any, []?: any, { p: {} }?: any) => ({}?: any, []?: any, { p: {} }?: any) => any >a : any >a : any >p : any @@ -71,7 +71,7 @@ >a : any return ({} = a, [] = a, { p: {} = a } = a) => a; ->({} = a, [] = a, { p: {} = a } = a) => a : ({}?: any, []?: any, { p: {} = a }?: any) => any +>({} = a, [] = a, { p: {} = a } = a) => a : ({}?: any, []?: any, { p: {} }?: any) => any >a : any >a : any >p : any diff --git a/testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns01_ES5iterable.types.diff b/testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns01_ES5iterable.types.diff deleted file mode 100644 index 90f1f262c9..0000000000 --- a/testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns01_ES5iterable.types.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.emptyVariableDeclarationBindingPatterns01_ES5iterable.types -+++ new.emptyVariableDeclarationBindingPatterns01_ES5iterable.types -@@= skipped -62, +62 lines =@@ - } - - function f({} = a, [] = a, { p: {} = a} = a) { -->f : ({}?: any, []?: any, { p: {} }?: any) => ({}?: any, []?: any, { p: {} }?: any) => any -+>f : ({}?: any, []?: any, { p: {} = a }?: any) => ({}?: any, []?: any, { p: {} = a }?: any) => any - >a : any - >a : any - >p : any -@@= skipped -8, +8 lines =@@ - >a : any - - return ({} = a, [] = a, { p: {} = a } = a) => a; -->({} = a, [] = a, { p: {} = a } = a) => a : ({}?: any, []?: any, { p: {} }?: any) => any -+>({} = a, [] = a, { p: {} = a } = a) => a : ({}?: any, []?: any, { p: {} = a }?: any) => any - >a : any - >a : any - >p : any \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns01_ES6.types b/testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns01_ES6.types index e3ba8809d5..57b7865fc5 100644 --- a/testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns01_ES6.types +++ b/testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns01_ES6.types @@ -63,7 +63,7 @@ } function f({} = a, [] = a, { p: {} = a} = a) { ->f : ({}?: any, []?: any, { p: {} = a }?: any) => ({}?: any, []?: any, { p: {} = a }?: any) => any +>f : ({}?: any, []?: any, { p: {} }?: any) => ({}?: any, []?: any, { p: {} }?: any) => any >a : any >a : any >p : any @@ -71,7 +71,7 @@ >a : any return ({} = a, [] = a, { p: {} = a } = a) => a; ->({} = a, [] = a, { p: {} = a } = a) => a : ({}?: any, []?: any, { p: {} = a }?: any) => any +>({} = a, [] = a, { p: {} = a } = a) => a : ({}?: any, []?: any, { p: {} }?: any) => any >a : any >a : any >p : any diff --git a/testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns01_ES6.types.diff b/testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns01_ES6.types.diff deleted file mode 100644 index 877738fc42..0000000000 --- a/testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns01_ES6.types.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.emptyVariableDeclarationBindingPatterns01_ES6.types -+++ new.emptyVariableDeclarationBindingPatterns01_ES6.types -@@= skipped -62, +62 lines =@@ - } - - function f({} = a, [] = a, { p: {} = a} = a) { -->f : ({}?: any, []?: any, { p: {} }?: any) => ({}?: any, []?: any, { p: {} }?: any) => any -+>f : ({}?: any, []?: any, { p: {} = a }?: any) => ({}?: any, []?: any, { p: {} = a }?: any) => any - >a : any - >a : any - >p : any -@@= skipped -8, +8 lines =@@ - >a : any - - return ({} = a, [] = a, { p: {} = a } = a) => a; -->({} = a, [] = a, { p: {} = a } = a) => a : ({}?: any, []?: any, { p: {} }?: any) => any -+>({} = a, [] = a, { p: {} = a } = a) => a : ({}?: any, []?: any, { p: {} = a }?: any) => any - >a : any - >a : any - >p : any \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/iterableArrayPattern20.types b/testdata/baselines/reference/submodule/conformance/iterableArrayPattern20.types index c23e079d94..0044e2f3ce 100644 --- a/testdata/baselines/reference/submodule/conformance/iterableArrayPattern20.types +++ b/testdata/baselines/reference/submodule/conformance/iterableArrayPattern20.types @@ -44,7 +44,7 @@ class FooArrayIterator { } function fun(...[[a = new Foo], b = [new Foo]]: Bar[][]) { } ->fun : (...[[a = new Foo], b = [new Foo]]: Bar[][]) => void +>fun : (...[[a], b]: Bar[][]) => void >a : Bar >new Foo : Foo >Foo : typeof Foo @@ -55,7 +55,7 @@ function fun(...[[a = new Foo], b = [new Foo]]: Bar[][]) { } fun(...new FooArrayIterator); >fun(...new FooArrayIterator) : void ->fun : (...[[a = new Foo], b = [new Foo]]: Bar[][]) => void +>fun : (...[[a], b]: Bar[][]) => void >...new FooArrayIterator : Foo[] >new FooArrayIterator : FooArrayIterator >FooArrayIterator : typeof FooArrayIterator diff --git a/testdata/baselines/reference/submodule/conformance/iterableArrayPattern20.types.diff b/testdata/baselines/reference/submodule/conformance/iterableArrayPattern20.types.diff deleted file mode 100644 index 3b532ec819..0000000000 --- a/testdata/baselines/reference/submodule/conformance/iterableArrayPattern20.types.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.iterableArrayPattern20.types -+++ new.iterableArrayPattern20.types -@@= skipped -43, +43 lines =@@ - } - - function fun(...[[a = new Foo], b = [new Foo]]: Bar[][]) { } -->fun : (...[[a], b]: Bar[][]) => void -+>fun : (...[[a = new Foo], b = [new Foo]]: Bar[][]) => void - >a : Bar - >new Foo : Foo - >Foo : typeof Foo -@@= skipped -11, +11 lines =@@ - - fun(...new FooArrayIterator); - >fun(...new FooArrayIterator) : void -->fun : (...[[a], b]: Bar[][]) => void -+>fun : (...[[a = new Foo], b = [new Foo]]: Bar[][]) => void - >...new FooArrayIterator : Foo[] - >new FooArrayIterator : FooArrayIterator - >FooArrayIterator : typeof FooArrayIterator \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/objectRest.types b/testdata/baselines/reference/submodule/conformance/objectRest.types index f12e78d4d3..13962f87f1 100644 --- a/testdata/baselines/reference/submodule/conformance/objectRest.types +++ b/testdata/baselines/reference/submodule/conformance/objectRest.types @@ -219,8 +219,8 @@ var { [computed]: stillNotGreat, [computed2]: soSo, ...o } = o; >o : { a: number; b: string; } var noContextualType = ({ aNumber = 12, ...notEmptyObject }) => aNumber + notEmptyObject.anythingGoes; ->noContextualType : ({ aNumber = 12, ...notEmptyObject }: { [x: string]: any; aNumber?: number; }) => any ->({ aNumber = 12, ...notEmptyObject }) => aNumber + notEmptyObject.anythingGoes : ({ aNumber = 12, ...notEmptyObject }: { [x: string]: any; aNumber?: number; }) => any +>noContextualType : ({ aNumber, ...notEmptyObject }: { [x: string]: any; aNumber?: number; }) => any +>({ aNumber = 12, ...notEmptyObject }) => aNumber + notEmptyObject.anythingGoes : ({ aNumber, ...notEmptyObject }: { [x: string]: any; aNumber?: number; }) => any >aNumber : number >12 : 12 >notEmptyObject : { [x: string]: any; } diff --git a/testdata/baselines/reference/submodule/conformance/objectRest.types.diff b/testdata/baselines/reference/submodule/conformance/objectRest.types.diff deleted file mode 100644 index 77f40cb894..0000000000 --- a/testdata/baselines/reference/submodule/conformance/objectRest.types.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- old.objectRest.types -+++ new.objectRest.types -@@= skipped -218, +218 lines =@@ - >o : { a: number; b: string; } - - var noContextualType = ({ aNumber = 12, ...notEmptyObject }) => aNumber + notEmptyObject.anythingGoes; -->noContextualType : ({ aNumber, ...notEmptyObject }: { [x: string]: any; aNumber?: number; }) => any -->({ aNumber = 12, ...notEmptyObject }) => aNumber + notEmptyObject.anythingGoes : ({ aNumber, ...notEmptyObject }: { [x: string]: any; aNumber?: number; }) => any -+>noContextualType : ({ aNumber = 12, ...notEmptyObject }: { [x: string]: any; aNumber?: number; }) => any -+>({ aNumber = 12, ...notEmptyObject }) => aNumber + notEmptyObject.anythingGoes : ({ aNumber = 12, ...notEmptyObject }: { [x: string]: any; aNumber?: number; }) => any - >aNumber : number - >12 : 12 - >notEmptyObject : { [x: string]: any; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/objectRestParameter.types b/testdata/baselines/reference/submodule/conformance/objectRestParameter.types index 65a0bff04f..78b299c51f 100644 --- a/testdata/baselines/reference/submodule/conformance/objectRestParameter.types +++ b/testdata/baselines/reference/submodule/conformance/objectRestParameter.types @@ -32,7 +32,7 @@ suddenly(({ x: a, ...rest }) => rest.y); suddenly(({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka); >suddenly(({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka) : any >suddenly : (f: (a: { x: { z: any; ka: any; }; y: string; }) => void) => any ->({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka : ({ x: { z = 12, ...nested }, ...rest }?: { x: { z: any; ka: any; }; y: string; }) => string +>({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka : ({ x: { z, ...nested }, ...rest }?: { x: { z: any; ka: any; }; y: string; }) => string >x : any >z : any >12 : 12 @@ -78,7 +78,7 @@ class C { } } function foobar({ bar={}, ...opts }: any = {}) { ->foobar : ({ bar = {}, ...opts }?: any) => void +>foobar : ({ bar, ...opts }?: any) => void >bar : any >{} : {} >opts : any @@ -86,18 +86,18 @@ function foobar({ bar={}, ...opts }: any = {}) { } foobar(); >foobar() : void ->foobar : ({ bar = {}, ...opts }?: any) => void +>foobar : ({ bar, ...opts }?: any) => void foobar({ baz: 'hello' }); >foobar({ baz: 'hello' }) : void ->foobar : ({ bar = {}, ...opts }?: any) => void +>foobar : ({ bar, ...opts }?: any) => void >{ baz: 'hello' } : { baz: string; } >baz : string >'hello' : "hello" foobar({ bar: { greeting: 'hello' } }); >foobar({ bar: { greeting: 'hello' } }) : void ->foobar : ({ bar = {}, ...opts }?: any) => void +>foobar : ({ bar, ...opts }?: any) => void >{ bar: { greeting: 'hello' } } : { bar: { greeting: string; }; } >bar : { greeting: string; } >{ greeting: 'hello' } : { greeting: string; } diff --git a/testdata/baselines/reference/submodule/conformance/objectRestParameter.types.diff b/testdata/baselines/reference/submodule/conformance/objectRestParameter.types.diff deleted file mode 100644 index f60af23cbb..0000000000 --- a/testdata/baselines/reference/submodule/conformance/objectRestParameter.types.diff +++ /dev/null @@ -1,42 +0,0 @@ ---- old.objectRestParameter.types -+++ new.objectRestParameter.types -@@= skipped -31, +31 lines =@@ - suddenly(({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka); - >suddenly(({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka) : any - >suddenly : (f: (a: { x: { z: any; ka: any; }; y: string; }) => void) => any -->({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka : ({ x: { z, ...nested }, ...rest }?: { x: { z: any; ka: any; }; y: string; }) => string -+>({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka : ({ x: { z = 12, ...nested }, ...rest }?: { x: { z: any; ka: any; }; y: string; }) => string - >x : any - >z : any - >12 : 12 -@@= skipped -46, +46 lines =@@ - } - } - function foobar({ bar={}, ...opts }: any = {}) { -->foobar : ({ bar, ...opts }?: any) => void -+>foobar : ({ bar = {}, ...opts }?: any) => void - >bar : any - >{} : {} - >opts : any -@@= skipped -8, +8 lines =@@ - } - foobar(); - >foobar() : void -->foobar : ({ bar, ...opts }?: any) => void -+>foobar : ({ bar = {}, ...opts }?: any) => void - - foobar({ baz: 'hello' }); - >foobar({ baz: 'hello' }) : void -->foobar : ({ bar, ...opts }?: any) => void -+>foobar : ({ bar = {}, ...opts }?: any) => void - >{ baz: 'hello' } : { baz: string; } - >baz : string - >'hello' : "hello" - - foobar({ bar: { greeting: 'hello' } }); - >foobar({ bar: { greeting: 'hello' } }) : void -->foobar : ({ bar, ...opts }?: any) => void -+>foobar : ({ bar = {}, ...opts }?: any) => void - >{ bar: { greeting: 'hello' } } : { bar: { greeting: string; }; } - >bar : { greeting: string; } - >{ greeting: 'hello' } : { greeting: string; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/objectRestParameterES5.types b/testdata/baselines/reference/submodule/conformance/objectRestParameterES5.types index 86de04b990..fbf42584da 100644 --- a/testdata/baselines/reference/submodule/conformance/objectRestParameterES5.types +++ b/testdata/baselines/reference/submodule/conformance/objectRestParameterES5.types @@ -32,7 +32,7 @@ suddenly(({ x: a, ...rest }) => rest.y); suddenly(({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka); >suddenly(({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka) : any >suddenly : (f: (a: { x: { z: any; ka: any; }; y: string; }) => void) => any ->({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka : ({ x: { z = 12, ...nested }, ...rest }?: { x: { z: any; ka: any; }; y: string; }) => string +>({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka : ({ x: { z, ...nested }, ...rest }?: { x: { z: any; ka: any; }; y: string; }) => string >x : any >z : any >12 : 12 @@ -78,7 +78,7 @@ class C { } } function foobar({ bar={}, ...opts }: any = {}) { ->foobar : ({ bar = {}, ...opts }?: any) => void +>foobar : ({ bar, ...opts }?: any) => void >bar : any >{} : {} >opts : any @@ -86,18 +86,18 @@ function foobar({ bar={}, ...opts }: any = {}) { } foobar(); >foobar() : void ->foobar : ({ bar = {}, ...opts }?: any) => void +>foobar : ({ bar, ...opts }?: any) => void foobar({ baz: 'hello' }); >foobar({ baz: 'hello' }) : void ->foobar : ({ bar = {}, ...opts }?: any) => void +>foobar : ({ bar, ...opts }?: any) => void >{ baz: 'hello' } : { baz: string; } >baz : string >'hello' : "hello" foobar({ bar: { greeting: 'hello' } }); >foobar({ bar: { greeting: 'hello' } }) : void ->foobar : ({ bar = {}, ...opts }?: any) => void +>foobar : ({ bar, ...opts }?: any) => void >{ bar: { greeting: 'hello' } } : { bar: { greeting: string; }; } >bar : { greeting: string; } >{ greeting: 'hello' } : { greeting: string; } diff --git a/testdata/baselines/reference/submodule/conformance/objectRestParameterES5.types.diff b/testdata/baselines/reference/submodule/conformance/objectRestParameterES5.types.diff deleted file mode 100644 index 89ef29a74d..0000000000 --- a/testdata/baselines/reference/submodule/conformance/objectRestParameterES5.types.diff +++ /dev/null @@ -1,42 +0,0 @@ ---- old.objectRestParameterES5.types -+++ new.objectRestParameterES5.types -@@= skipped -31, +31 lines =@@ - suddenly(({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka); - >suddenly(({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka) : any - >suddenly : (f: (a: { x: { z: any; ka: any; }; y: string; }) => void) => any -->({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka : ({ x: { z, ...nested }, ...rest }?: { x: { z: any; ka: any; }; y: string; }) => string -+>({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka : ({ x: { z = 12, ...nested }, ...rest }?: { x: { z: any; ka: any; }; y: string; }) => string - >x : any - >z : any - >12 : 12 -@@= skipped -46, +46 lines =@@ - } - } - function foobar({ bar={}, ...opts }: any = {}) { -->foobar : ({ bar, ...opts }?: any) => void -+>foobar : ({ bar = {}, ...opts }?: any) => void - >bar : any - >{} : {} - >opts : any -@@= skipped -8, +8 lines =@@ - } - foobar(); - >foobar() : void -->foobar : ({ bar, ...opts }?: any) => void -+>foobar : ({ bar = {}, ...opts }?: any) => void - - foobar({ baz: 'hello' }); - >foobar({ baz: 'hello' }) : void -->foobar : ({ bar, ...opts }?: any) => void -+>foobar : ({ bar = {}, ...opts }?: any) => void - >{ baz: 'hello' } : { baz: string; } - >baz : string - >'hello' : "hello" - - foobar({ bar: { greeting: 'hello' } }); - >foobar({ bar: { greeting: 'hello' } }) : void -->foobar : ({ bar, ...opts }?: any) => void -+>foobar : ({ bar = {}, ...opts }?: any) => void - >{ bar: { greeting: 'hello' } } : { bar: { greeting: string; }; } - >bar : { greeting: string; } - >{ greeting: 'hello' } : { greeting: string; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/optionalBindingParameters3.types b/testdata/baselines/reference/submodule/conformance/optionalBindingParameters3.types index 9ea7fa311b..5c712385af 100644 --- a/testdata/baselines/reference/submodule/conformance/optionalBindingParameters3.types +++ b/testdata/baselines/reference/submodule/conformance/optionalBindingParameters3.types @@ -10,7 +10,7 @@ * @param {Foo} [options] */ function f({ a = "a" }) {} ->f : ({ a = "a" }: { a?: string; }) => void +>f : ({ a }: { a?: string; }) => void >a : string >"a" : "a" diff --git a/testdata/baselines/reference/submodule/conformance/tsxStatelessFunctionComponents1.types b/testdata/baselines/reference/submodule/conformance/tsxStatelessFunctionComponents1.types index 234947c562..1f121ece6a 100644 --- a/testdata/baselines/reference/submodule/conformance/tsxStatelessFunctionComponents1.types +++ b/testdata/baselines/reference/submodule/conformance/tsxStatelessFunctionComponents1.types @@ -22,7 +22,7 @@ function Greet(x: {name: string}) { >div : any } function Meet({name = 'world'}) { ->Meet : ({ name = "world" }: { name?: string; }) => JSX.Element +>Meet : ({ name }: { name?: string; }) => JSX.Element >name : string >'world' : "world" @@ -68,26 +68,26 @@ let b = ; let c = ; >c : JSX.Element > : JSX.Element ->Meet : ({ name = "world" }: { name?: string; }) => JSX.Element +>Meet : ({ name }: { name?: string; }) => JSX.Element let c1 = ; >c1 : JSX.Element > : JSX.Element ->Meet : ({ name = "world" }: { name?: string; }) => JSX.Element +>Meet : ({ name }: { name?: string; }) => JSX.Element >extra-prop : true // OK let d = ; >d : JSX.Element > : JSX.Element ->Meet : ({ name = "world" }: { name?: string; }) => JSX.Element +>Meet : ({ name }: { name?: string; }) => JSX.Element >name : string // Error let e = ; >e : JSX.Element > : JSX.Element ->Meet : ({ name = "world" }: { name?: string; }) => JSX.Element +>Meet : ({ name }: { name?: string; }) => JSX.Element >name : number >42 : 42 @@ -95,7 +95,7 @@ let e = ; let f = ; >f : JSX.Element > : JSX.Element ->Meet : ({ name = "world" }: { name?: string; }) => JSX.Element +>Meet : ({ name }: { name?: string; }) => JSX.Element >naaaaaaame : string // OK diff --git a/testdata/baselines/reference/submodule/conformance/tsxStatelessFunctionComponents1.types.diff b/testdata/baselines/reference/submodule/conformance/tsxStatelessFunctionComponents1.types.diff deleted file mode 100644 index 609c7bc77a..0000000000 --- a/testdata/baselines/reference/submodule/conformance/tsxStatelessFunctionComponents1.types.diff +++ /dev/null @@ -1,51 +0,0 @@ ---- old.tsxStatelessFunctionComponents1.types -+++ new.tsxStatelessFunctionComponents1.types -@@= skipped -21, +21 lines =@@ - >div : any - } - function Meet({name = 'world'}) { -->Meet : ({ name }: { name?: string; }) => JSX.Element -+>Meet : ({ name = "world" }: { name?: string; }) => JSX.Element - >name : string - >'world' : "world" - -@@= skipped -46, +46 lines =@@ - let c = ; - >c : JSX.Element - > : JSX.Element -->Meet : ({ name }: { name?: string; }) => JSX.Element -+>Meet : ({ name = "world" }: { name?: string; }) => JSX.Element - - let c1 = ; - >c1 : JSX.Element - > : JSX.Element -->Meet : ({ name }: { name?: string; }) => JSX.Element -+>Meet : ({ name = "world" }: { name?: string; }) => JSX.Element - >extra-prop : true - - // OK - let d = ; - >d : JSX.Element - > : JSX.Element -->Meet : ({ name }: { name?: string; }) => JSX.Element -+>Meet : ({ name = "world" }: { name?: string; }) => JSX.Element - >name : string - - // Error - let e = ; - >e : JSX.Element - > : JSX.Element -->Meet : ({ name }: { name?: string; }) => JSX.Element -+>Meet : ({ name = "world" }: { name?: string; }) => JSX.Element - >name : number - >42 : 42 - -@@= skipped -27, +27 lines =@@ - let f = ; - >f : JSX.Element - > : JSX.Element -->Meet : ({ name }: { name?: string; }) => JSX.Element -+>Meet : ({ name = "world" }: { name?: string; }) => JSX.Element - >naaaaaaame : string - - // OK \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/checkDestructuringShorthandAssigment.types.diff b/testdata/baselines/reference/submoduleAccepted/compiler/checkDestructuringShorthandAssigment.types.diff deleted file mode 100644 index 4028de2685..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/compiler/checkDestructuringShorthandAssigment.types.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.checkDestructuringShorthandAssigment.types -+++ new.checkDestructuringShorthandAssigment.types -@@= skipped -2, +2 lines =@@ - === bug25434.js === - // should not crash while checking - function Test({ b = '' } = {}) {} -->Test : ({ b }?: { b?: string; }) => void -+>Test : ({ b = "" }?: { b?: string; }) => void - >b : string - >'' : "" - >{} : {} - - Test(({ b = '5' } = {})); - >Test(({ b = '5' } = {})) : void -->Test : ({ b }?: { b?: string; }) => void -+>Test : ({ b = "" }?: { b?: string; }) => void - >({ b = '5' } = {}) : {} - >{ b = '5' } = {} : {} - >{ b = '5' } : { b?: any; } \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/destructuringParameterDeclaration9(strict=false).types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/destructuringParameterDeclaration9(strict=false).types.diff index 0f498eddbf..98b53f2fe9 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/destructuringParameterDeclaration9(strict=false).types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/destructuringParameterDeclaration9(strict=false).types.diff @@ -5,7 +5,7 @@ */ export function prepareConfig({ ->prepareConfig : ({ additionalFiles: { json } }?: { additionalFiles?: Partial>;}) => void -+>prepareConfig : ({ additionalFiles: { json = [] } = {} }?: { additionalFiles?: { json?: any[]; }; }) => void ++>prepareConfig : ({ additionalFiles: { json } }?: { additionalFiles?: { json?: any[]; }; }) => void additionalFiles: { >additionalFiles : any @@ -25,11 +25,6 @@ } export function prepareConfigWithoutAnnotation({ -->prepareConfigWithoutAnnotation : ({ additionalFiles: { json } }?: { additionalFiles?: { json?: any[]; }; }) => void -+>prepareConfigWithoutAnnotation : ({ additionalFiles: { json = [] } = {} }?: { additionalFiles?: { json?: any[]; }; }) => void - - additionalFiles: { - >additionalFiles : any @@= skipped -27, +27 lines =@@ additionalFiles?: Partial>; }) => void} */ @@ -37,7 +32,7 @@ ->prepareConfigWithContextualSignature : (param: { additionalFiles?: Partial>; }) => void ->({ additionalFiles: { json = [] } = {}} = {})=> { json // string[]} : ({ additionalFiles: { json } }?: { additionalFiles?: Partial>; }) => void +>prepareConfigWithContextualSignature : (param: { additionalFiles?: Partial>; }) => void -+>({ additionalFiles: { json = [] } = {}} = {})=> { json // string[]} : ({ additionalFiles: { json = [] } = {} }?: { additionalFiles?: Partial>; }) => void ++>({ additionalFiles: { json = [] } = {}} = {})=> { json // string[]} : ({ additionalFiles: { json } }?: { additionalFiles?: Partial>; }) => void additionalFiles: { >additionalFiles : any @@ -46,7 +41,7 @@ */ function f1({ a: { json = [] } = {} } = {}) { return json } ->f1 : ({ a: { json } }?: { a?: { json?: string[]; }; }) => string[] -+>f1 : ({ a: { json = [] } = {} }?: { a?: { json?: any[]; }; }) => any[] ++>f1 : ({ a: { json } }?: { a?: { json?: any[]; }; }) => any[] >a : any ->json : string[] +>json : any[] @@ -62,7 +57,7 @@ function f2([[json = []] = []] = []) { return json } ->f2 : ([[json]]?: [[string[]?]?]) => string[] ->json : string[] -+>f2 : ([[json = []] = []]?: [[any[]?]?]) => any[] ++>f2 : ([[json]]?: [[any[]?]?]) => any[] +>json : any[] >[] : undefined[] >[] : [] diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/destructuringParameterDeclaration9(strict=true).types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/destructuringParameterDeclaration9(strict=true).types.diff index 04d4aa3266..fad06a430c 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/destructuringParameterDeclaration9(strict=true).types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/destructuringParameterDeclaration9(strict=true).types.diff @@ -5,7 +5,7 @@ */ export function prepareConfig({ ->prepareConfig : ({ additionalFiles: { json } }?: { additionalFiles?: Partial> | undefined;}) => void -+>prepareConfig : ({ additionalFiles: { json = [] } = {} }?: { additionalFiles?: { json?: never[] | undefined; } | undefined; }) => void ++>prepareConfig : ({ additionalFiles: { json } }?: { additionalFiles?: { json?: never[] | undefined; } | undefined; }) => void additionalFiles: { >additionalFiles : any @@ -25,10 +25,7 @@ } export function prepareConfigWithoutAnnotation({ -->prepareConfigWithoutAnnotation : ({ additionalFiles: { json } }?: { additionalFiles?: { json?: never[] | undefined; } | undefined; }) => void -+>prepareConfigWithoutAnnotation : ({ additionalFiles: { json = [] } = {} }?: { additionalFiles?: { json?: never[] | undefined; } | undefined; }) => void - - additionalFiles: { +@@= skipped -10, +10 lines =@@ >additionalFiles : any json = [] @@ -37,7 +34,7 @@ >[] : never[] } = {} -@@= skipped -20, +20 lines =@@ +@@= skipped -10, +10 lines =@@ >{} : {} json @@ -52,7 +49,7 @@ ->prepareConfigWithContextualSignature : (param: { additionalFiles?: Partial>; }) => void ->({ additionalFiles: { json = [] } = {}} = {})=> { json // string[]} : ({ additionalFiles: { json } }?: { additionalFiles?: Partial>; }) => void +>prepareConfigWithContextualSignature : (param: { additionalFiles?: Partial> | undefined; }) => void -+>({ additionalFiles: { json = [] } = {}} = {})=> { json // string[]} : ({ additionalFiles: { json = [] } = {} }?: { additionalFiles?: Partial> | undefined; }) => void ++>({ additionalFiles: { json = [] } = {}} = {})=> { json // string[]} : ({ additionalFiles: { json } }?: { additionalFiles?: Partial> | undefined; }) => void additionalFiles: { >additionalFiles : any @@ -61,7 +58,7 @@ */ function f1({ a: { json = [] } = {} } = {}) { return json } ->f1 : ({ a: { json } }?: { a?: { json?: string[]; }; }) => string[] -+>f1 : ({ a: { json = [] } = {} }?: { a?: { json?: never[] | undefined; } | undefined; }) => never[] ++>f1 : ({ a: { json } }?: { a?: { json?: never[] | undefined; } | undefined; }) => never[] >a : any ->json : string[] +>json : never[] @@ -77,7 +74,7 @@ function f2([[json = []] = []] = []) { return json } ->f2 : ([[json]]?: [[string[]?]?]) => string[] ->json : string[] -+>f2 : ([[json = []] = []]?: [([(never[] | undefined)?] | undefined)?]) => never[] ++>f2 : ([[json]]?: [([(never[] | undefined)?] | undefined)?]) => never[] +>json : never[] >[] : never[] >[] : [] diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/optionalBindingParameters3.types.diff b/testdata/baselines/reference/submoduleAccepted/conformance/optionalBindingParameters3.types.diff index ab3b9fdcf6..c05f17d5b2 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/optionalBindingParameters3.types.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/optionalBindingParameters3.types.diff @@ -5,6 +5,6 @@ */ function f({ a = "a" }) {} ->f : ({ a }?: Foo) => void -+>f : ({ a = "a" }: { a?: string; }) => void ++>f : ({ a }: { a?: string; }) => void >a : string >"a" : "a"