* Use faster, stricter prop type comparison when merging props in union prop creation * Be better at determining this usage in methods, accept baselines * Small style change
27 lines
1.3 KiB
Plaintext
27 lines
1.3 KiB
Plaintext
=== tests/cases/conformance/types/typeRelationships/typeInference/bivariantInferences.ts ===
|
|
// Repro from #27337
|
|
|
|
interface Array<T> {
|
|
equalsShallow<T>(this: ReadonlyArray<T>, other: ReadonlyArray<T>): boolean;
|
|
>equalsShallow : <T>(this: ReadonlyArray<T>, other: ReadonlyArray<T>) => boolean
|
|
>this : readonly T[]
|
|
>other : readonly T[]
|
|
}
|
|
|
|
declare const a: (string | number)[] | null[] | undefined[] | {}[];
|
|
>a : (string | number)[] | null[] | undefined[] | {}[]
|
|
>null : null
|
|
|
|
declare const b: (string | number)[] | null[] | undefined[] | {}[];
|
|
>b : (string | number)[] | null[] | undefined[] | {}[]
|
|
>null : null
|
|
|
|
let x = a.equalsShallow(b);
|
|
>x : boolean
|
|
>a.equalsShallow(b) : boolean
|
|
>a.equalsShallow : (<T>(this: readonly T[], other: readonly T[]) => boolean) | (<T>(this: readonly T[], other: readonly T[]) => boolean) | (<T>(this: readonly T[], other: readonly T[]) => boolean) | (<T>(this: readonly T[], other: readonly T[]) => boolean)
|
|
>a : (string | number)[] | null[] | undefined[] | {}[]
|
|
>equalsShallow : (<T>(this: readonly T[], other: readonly T[]) => boolean) | (<T>(this: readonly T[], other: readonly T[]) => boolean) | (<T>(this: readonly T[], other: readonly T[]) => boolean) | (<T>(this: readonly T[], other: readonly T[]) => boolean)
|
|
>b : (string | number)[] | null[] | undefined[] | {}[]
|
|
|