mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
20 lines
523 B
TypeScript
20 lines
523 B
TypeScript
//// [tests/cases/conformance/types/typeRelationships/typeInference/bivariantInferences.ts] ////
|
|
|
|
//// [bivariantInferences.ts]
|
|
// Repro from #27337
|
|
|
|
interface Array<T> {
|
|
equalsShallow<T>(this: ReadonlyArray<T>, other: ReadonlyArray<T>): boolean;
|
|
}
|
|
|
|
declare const a: (string | number)[] | null[] | undefined[] | {}[];
|
|
declare const b: (string | number)[] | null[] | undefined[] | {}[];
|
|
|
|
let x = a.equalsShallow(b);
|
|
|
|
|
|
//// [bivariantInferences.js]
|
|
"use strict";
|
|
// Repro from #27337
|
|
let x = a.equalsShallow(b);
|