@@ -321,7 +321,7 @@ interface B<T> { variant: 'b', value: Array<T> }
321321>T : Symbol(T, Decl(dependentDestructuredVariables.ts, 128, 12))
322322>variant : Symbol(B.variant, Decl(dependentDestructuredVariables.ts, 128, 16))
323323>value : Symbol(B.value, Decl(dependentDestructuredVariables.ts, 128, 30))
324- >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
324+ >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more )
325325>T : Symbol(T, Decl(dependentDestructuredVariables.ts, 128, 12))
326326
327327type AB<T> = A<T> | B<T>;
@@ -342,7 +342,7 @@ declare function printValueList<T>(t: Array<T>): void;
342342>printValueList : Symbol(printValueList, Decl(dependentDestructuredVariables.ts, 132, 43))
343343>T : Symbol(T, Decl(dependentDestructuredVariables.ts, 134, 32))
344344>t : Symbol(t, Decl(dependentDestructuredVariables.ts, 134, 35))
345- >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
345+ >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more )
346346>T : Symbol(T, Decl(dependentDestructuredVariables.ts, 134, 32))
347347
348348function unrefined1<T>(ab: AB<T>): void {
@@ -514,7 +514,7 @@ declare function readFile(path: string, callback: (...args: [err: null, data: un
514514>path : Symbol(path, Decl(dependentDestructuredVariables.ts, 200, 26))
515515>callback : Symbol(callback, Decl(dependentDestructuredVariables.ts, 200, 39))
516516>args : Symbol(args, Decl(dependentDestructuredVariables.ts, 200, 51))
517- >Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
517+ >Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2022.error.d.ts, --, --) )
518518
519519readFile('hello', (err, data) => {
520520>readFile : Symbol(readFile, Decl(dependentDestructuredVariables.ts, 198, 2))
@@ -595,3 +595,160 @@ reducer("concat", { firstArr: [1, 2], secondArr: [3, 4] });
595595>firstArr : Symbol(firstArr, Decl(dependentDestructuredVariables.ts, 225, 19))
596596>secondArr : Symbol(secondArr, Decl(dependentDestructuredVariables.ts, 225, 37))
597597
598+ // repro from https://github.com/microsoft/TypeScript/pull/47190#issuecomment-1057603588
599+
600+ type FooMethod = {
601+ >FooMethod : Symbol(FooMethod, Decl(dependentDestructuredVariables.ts, 225, 59))
602+
603+ method(...args:
604+ >method : Symbol(method, Decl(dependentDestructuredVariables.ts, 229, 18))
605+ >args : Symbol(args, Decl(dependentDestructuredVariables.ts, 230, 9))
606+
607+ [type: "str", cb: (e: string) => void] |
608+ >e : Symbol(e, Decl(dependentDestructuredVariables.ts, 231, 23))
609+
610+ [type: "num", cb: (e: number) => void]
611+ >e : Symbol(e, Decl(dependentDestructuredVariables.ts, 232, 23))
612+
613+ ): void;
614+ }
615+
616+ let fooM: FooMethod = {
617+ >fooM : Symbol(fooM, Decl(dependentDestructuredVariables.ts, 236, 3))
618+ >FooMethod : Symbol(FooMethod, Decl(dependentDestructuredVariables.ts, 225, 59))
619+
620+ method(type, cb) {
621+ >method : Symbol(method, Decl(dependentDestructuredVariables.ts, 236, 23))
622+ >type : Symbol(type, Decl(dependentDestructuredVariables.ts, 237, 9))
623+ >cb : Symbol(cb, Decl(dependentDestructuredVariables.ts, 237, 14))
624+
625+ if (type == 'num') {
626+ >type : Symbol(type, Decl(dependentDestructuredVariables.ts, 237, 9))
627+
628+ cb(123)
629+ >cb : Symbol(cb, Decl(dependentDestructuredVariables.ts, 237, 14))
630+
631+ } else {
632+ cb("abc")
633+ >cb : Symbol(cb, Decl(dependentDestructuredVariables.ts, 237, 14))
634+ }
635+ }
636+ };
637+
638+ type FooAsyncMethod = {
639+ >FooAsyncMethod : Symbol(FooAsyncMethod, Decl(dependentDestructuredVariables.ts, 244, 2))
640+
641+ method(...args:
642+ >method : Symbol(method, Decl(dependentDestructuredVariables.ts, 246, 23))
643+ >args : Symbol(args, Decl(dependentDestructuredVariables.ts, 247, 9))
644+
645+ [type: "str", cb: (e: string) => void] |
646+ >e : Symbol(e, Decl(dependentDestructuredVariables.ts, 248, 23))
647+
648+ [type: "num", cb: (e: number) => void]
649+ >e : Symbol(e, Decl(dependentDestructuredVariables.ts, 249, 23))
650+
651+ ): Promise<any>;
652+ >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --))
653+ }
654+
655+ let fooAsyncM: FooAsyncMethod = {
656+ >fooAsyncM : Symbol(fooAsyncM, Decl(dependentDestructuredVariables.ts, 253, 3))
657+ >FooAsyncMethod : Symbol(FooAsyncMethod, Decl(dependentDestructuredVariables.ts, 244, 2))
658+
659+ async method(type, cb) {
660+ >method : Symbol(method, Decl(dependentDestructuredVariables.ts, 253, 33))
661+ >type : Symbol(type, Decl(dependentDestructuredVariables.ts, 254, 15))
662+ >cb : Symbol(cb, Decl(dependentDestructuredVariables.ts, 254, 20))
663+
664+ if (type == 'num') {
665+ >type : Symbol(type, Decl(dependentDestructuredVariables.ts, 254, 15))
666+
667+ cb(123)
668+ >cb : Symbol(cb, Decl(dependentDestructuredVariables.ts, 254, 20))
669+
670+ } else {
671+ cb("abc")
672+ >cb : Symbol(cb, Decl(dependentDestructuredVariables.ts, 254, 20))
673+ }
674+ }
675+ };
676+
677+ type FooGenMethod = {
678+ >FooGenMethod : Symbol(FooGenMethod, Decl(dependentDestructuredVariables.ts, 261, 2))
679+
680+ method(...args:
681+ >method : Symbol(method, Decl(dependentDestructuredVariables.ts, 263, 21))
682+ >args : Symbol(args, Decl(dependentDestructuredVariables.ts, 264, 9))
683+
684+ [type: "str", cb: (e: string) => void] |
685+ >e : Symbol(e, Decl(dependentDestructuredVariables.ts, 265, 23))
686+
687+ [type: "num", cb: (e: number) => void]
688+ >e : Symbol(e, Decl(dependentDestructuredVariables.ts, 266, 23))
689+
690+ ): Generator<any, any, any>;
691+ >Generator : Symbol(Generator, Decl(lib.es2015.generator.d.ts, --, --))
692+ }
693+
694+ let fooGenM: FooGenMethod = {
695+ >fooGenM : Symbol(fooGenM, Decl(dependentDestructuredVariables.ts, 270, 3))
696+ >FooGenMethod : Symbol(FooGenMethod, Decl(dependentDestructuredVariables.ts, 261, 2))
697+
698+ *method(type, cb) {
699+ >method : Symbol(method, Decl(dependentDestructuredVariables.ts, 270, 29))
700+ >type : Symbol(type, Decl(dependentDestructuredVariables.ts, 271, 10))
701+ >cb : Symbol(cb, Decl(dependentDestructuredVariables.ts, 271, 15))
702+
703+ if (type == 'num') {
704+ >type : Symbol(type, Decl(dependentDestructuredVariables.ts, 271, 10))
705+
706+ cb(123)
707+ >cb : Symbol(cb, Decl(dependentDestructuredVariables.ts, 271, 15))
708+
709+ } else {
710+ cb("abc")
711+ >cb : Symbol(cb, Decl(dependentDestructuredVariables.ts, 271, 15))
712+ }
713+ }
714+ };
715+
716+ type FooAsyncGenMethod = {
717+ >FooAsyncGenMethod : Symbol(FooAsyncGenMethod, Decl(dependentDestructuredVariables.ts, 278, 2))
718+
719+ method(...args:
720+ >method : Symbol(method, Decl(dependentDestructuredVariables.ts, 280, 26))
721+ >args : Symbol(args, Decl(dependentDestructuredVariables.ts, 281, 9))
722+
723+ [type: "str", cb: (e: string) => void] |
724+ >e : Symbol(e, Decl(dependentDestructuredVariables.ts, 282, 23))
725+
726+ [type: "num", cb: (e: number) => void]
727+ >e : Symbol(e, Decl(dependentDestructuredVariables.ts, 283, 23))
728+
729+ ): AsyncGenerator<any, any, any>;
730+ >AsyncGenerator : Symbol(AsyncGenerator, Decl(lib.es2018.asyncgenerator.d.ts, --, --))
731+ }
732+
733+ let fooAsyncGenM: FooAsyncGenMethod = {
734+ >fooAsyncGenM : Symbol(fooAsyncGenM, Decl(dependentDestructuredVariables.ts, 287, 3))
735+ >FooAsyncGenMethod : Symbol(FooAsyncGenMethod, Decl(dependentDestructuredVariables.ts, 278, 2))
736+
737+ async *method(type, cb) {
738+ >method : Symbol(method, Decl(dependentDestructuredVariables.ts, 287, 39))
739+ >type : Symbol(type, Decl(dependentDestructuredVariables.ts, 288, 16))
740+ >cb : Symbol(cb, Decl(dependentDestructuredVariables.ts, 288, 21))
741+
742+ if (type == 'num') {
743+ >type : Symbol(type, Decl(dependentDestructuredVariables.ts, 288, 16))
744+
745+ cb(123)
746+ >cb : Symbol(cb, Decl(dependentDestructuredVariables.ts, 288, 21))
747+
748+ } else {
749+ cb("abc")
750+ >cb : Symbol(cb, Decl(dependentDestructuredVariables.ts, 288, 21))
751+ }
752+ }
753+ };
754+
0 commit comments