27 lines
853 B
Text
27 lines
853 B
Text
=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures.ts ===
|
|
// some complex cases of assignment compat of generic signatures that stress contextual signature instantiation
|
|
|
|
var f: <S extends { p: string }[]>(x: S) => void
|
|
>f : <S extends { p: string; }[]>(x: S) => void
|
|
>S : S
|
|
>p : string
|
|
>x : S
|
|
>S : S
|
|
|
|
var g: <T extends { p: string }>(x: T[]) => void
|
|
>g : <T extends { p: string; }>(x: T[]) => void
|
|
>T : T
|
|
>p : string
|
|
>x : T[]
|
|
>T : T
|
|
|
|
f = g; // ok
|
|
>f = g : <T extends { p: string; }>(x: T[]) => void
|
|
>f : <S extends { p: string; }[]>(x: S) => void
|
|
>g : <T extends { p: string; }>(x: T[]) => void
|
|
|
|
g = f; // ok
|
|
>g = f : <S extends { p: string; }[]>(x: S) => void
|
|
>g : <T extends { p: string; }>(x: T[]) => void
|
|
>f : <S extends { p: string; }[]>(x: S) => void
|
|
|