update baseline (#50252)

This commit is contained in:
Oleksandr T
2022-08-10 01:52:59 -07:00
committed by GitHub
parent 5f64ae878e
commit 3c3909b8d0
4 changed files with 6 additions and 10 deletions
@@ -371,7 +371,7 @@ function f1x(obj) {
//// [narrowingUnionToUnion.d.ts]
declare type Falsy = false | 0 | 0n | '' | null | undefined;
type Falsy = false | 0 | 0n | '' | null | undefined;
declare function isFalsy(value: unknown): value is Falsy;
declare function fx1(x: string | number | undefined): void;
declare function fx2<T>(x: T | undefined): void;
@@ -411,7 +411,7 @@ declare function isMaybeZero(value: number | null | undefined): value is 0 | nul
declare function isEmptyArray<T>(value: T[]): value is [];
declare function isMaybeEmptyArray<T>(value: T[] | null | undefined): value is [] | null | undefined;
declare const TEST_CASES: (((value: string) => void) | ((value: number) => void) | ((value: string[]) => void))[];
declare type EmptyString = '' | null | undefined;
type EmptyString = '' | null | undefined;
declare function isEmpty(value: string | EmptyString): value is EmptyString;
declare let test: string | null | undefined;
declare function assert<T>(value: any): asserts value is T;
@@ -43,6 +43,6 @@ ImportInterface;
//// [index.d.ts]
export declare type LocalInterface = import("pkg", { assert: {} });
export type LocalInterface = import("pkg", { assert: {} });
export declare const a: any;
export declare const b: any;
@@ -37,9 +37,5 @@ inJsArrow(2); // no error gets linted as expected
//// [typeTagOnFunctionReferencesGeneric.d.ts]
/**
* @typedef {<T>(m : T) => T} IFn
*/
/**@type {IFn}*/
export function inJs<T>(l: T): T;
export function inJs<T>(m: T): T;
export type IFn = <T>(m: T) => T;
@@ -5,7 +5,7 @@
/**@type {IFn}*/
export function inJs(l) {
>inJs : <T>(l: T) => T
>inJs : <T>(m: T) => T
>l : T
return l;
@@ -13,7 +13,7 @@ export function inJs(l) {
}
inJs(1); // lints error. Why?
>inJs(1) : 1
>inJs : <T>(l: T) => T
>inJs : <T>(m: T) => T
>1 : 1
/**@type {IFn}*/