@@ -777,3 +777,28 @@ if (foobarPred(foobar)) {
777777>foo : Symbol(foo, Decl(inferTypePredicates.ts, 271, 18))
778778}
779779
780+ // https://github.com/microsoft/TypeScript/issues/60778
781+ const arrTest: Array<number> = [1, 2, null, 3].filter(
782+ >arrTest : Symbol(arrTest, Decl(inferTypePredicates.ts, 280, 5))
783+ >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
784+ >[1, 2, null, 3].filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
785+ >filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
786+
787+ (x) => (x != null) satisfies boolean,
788+ >x : Symbol(x, Decl(inferTypePredicates.ts, 281, 3))
789+ >x : Symbol(x, Decl(inferTypePredicates.ts, 281, 3))
790+
791+ );
792+
793+ function isEmptyString(x: unknown) {
794+ >isEmptyString : Symbol(isEmptyString, Decl(inferTypePredicates.ts, 282, 2))
795+ >x : Symbol(x, Decl(inferTypePredicates.ts, 284, 23))
796+
797+ const rv = x === "";
798+ >rv : Symbol(rv, Decl(inferTypePredicates.ts, 285, 7))
799+ >x : Symbol(x, Decl(inferTypePredicates.ts, 284, 23))
800+
801+ return rv satisfies boolean;
802+ >rv : Symbol(rv, Decl(inferTypePredicates.ts, 285, 7))
803+ }
804+
0 commit comments