Home
last modified time | relevance | path

Searched refs:Covariant (Results 1 – 16 of 16) sorted by relevance

/third_party/typescript/tests/baselines/reference/
DvarianceAnnotations.types2 type Covariant<out T> = {
3 >Covariant : Covariant<T>
9 declare let super_covariant: Covariant<unknown>;
10 >super_covariant : Covariant<unknown>
12 declare let sub_covariant: Covariant<string>;
13 >sub_covariant : Covariant<string>
16 >super_covariant = sub_covariant : Covariant<string>
17 >super_covariant : Covariant<unknown>
18 >sub_covariant : Covariant<string>
21 >sub_covariant = super_covariant : Covariant<unknown>
[all …]
DvarianceAnnotations.js2 type Covariant<out T> = {
6 declare let super_covariant: Covariant<unknown>;
7 declare let sub_covariant: Covariant<string>;
223 type Covariant<out T> = {
226 declare let super_covariant: Covariant<unknown>;
227 declare let sub_covariant: Covariant<string>;
DconditionalTypes2.types2 interface Covariant<T> {
17 function f1<A, B extends A>(a: Covariant<A>, b: Covariant<B>) {
18 >f1 : <A, B extends A>(a: Covariant<A>, b: Covariant<B>) => void
19 >a : Covariant<A>
20 >b : Covariant<B>
23 >a = b : Covariant<B>
24 >a : Covariant<A>
25 >b : Covariant<B>
28 >b = a : Covariant<A>
29 >b : Covariant<B>
[all …]
DvarianceAnnotations.symbols2 type Covariant<out T> = {
3 >Covariant : Symbol(Covariant, Decl(varianceAnnotations.ts, 0, 0))
11 declare let super_covariant: Covariant<unknown>;
13 >Covariant : Symbol(Covariant, Decl(varianceAnnotations.ts, 0, 0))
15 declare let sub_covariant: Covariant<string>;
17 >Covariant : Symbol(Covariant, Decl(varianceAnnotations.ts, 0, 0))
DconditionalTypes2.js2 interface Covariant<T> {
14 function f1<A, B extends A>(a: Covariant<A>, b: Covariant<B>) {
329 interface Covariant<T> {
338 declare function f1<A, B extends A>(a: Covariant<A>, b: Covariant<B>): void;
DconditionalTypes2.errors.txt1 …al/conditionalTypes2.ts(15,5): error TS2322: Type 'Covariant<A>' is not assignable to type 'Covari…
39 interface Covariant<T> {
51 function f1<A, B extends A>(a: Covariant<A>, b: Covariant<B>) {
55 !!! error TS2322: Type 'Covariant<A>' is not assignable to type 'Covariant<B>'.
DvarianceAnnotations.errors.txt1 …arianceAnnotations.ts(9,1): error TS2322: Type 'Covariant<unknown>' is not assignable to type 'Cov…
70 type Covariant<out T> = {
74 declare let super_covariant: Covariant<unknown>;
75 declare let sub_covariant: Covariant<string>;
80 !!! error TS2322: Type 'Covariant<unknown>' is not assignable to type 'Covariant<string>'.
DconditionalTypes2.symbols2 interface Covariant<T> {
3 >Covariant : Symbol(Covariant, Decl(conditionalTypes2.ts, 0, 0))
7 >foo : Symbol(Covariant.foo, Decl(conditionalTypes2.ts, 0, 24))
33 function f1<A, B extends A>(a: Covariant<A>, b: Covariant<B>) {
39 >Covariant : Symbol(Covariant, Decl(conditionalTypes2.ts, 0, 0))
42 >Covariant : Symbol(Covariant, Decl(conditionalTypes2.ts, 0, 0))
DvarianceMeasurement.types125 // Covariant in B
DvarianceMeasurement.errors.txt118 // Covariant in B
DvarianceMeasurement.symbols175 // Covariant in B
/third_party/typescript/tests/cases/conformance/types/typeParameters/typeParameterLists/
DvarianceAnnotations.ts4 type Covariant<out T> = { alias
8 declare let super_covariant: Covariant<unknown>;
9 declare let sub_covariant: Covariant<string>;
/third_party/typescript/tests/cases/conformance/types/conditional/
DconditionalTypes2.ts4 interface Covariant<T> { interface
16 function f1<A, B extends A>(a: Covariant<A>, b: Covariant<B>) {
/third_party/typescript/src/compiler/
Ddebug.ts775 variance === VarianceFlags.Covariant ? "out" :
Dtypes.ts5962 Covariant = 1 << 0, // Covariant
5964 Bivariant = Covariant | Contravariant, // Both covariant and contravariant
5966 …VarianceMask = Invariant | Covariant | Contravariant | Independent, // Mask containing all measur…
Dchecker.ts354 const arrayVariances = [VarianceFlags.Covariant];
19550 … const varianceFlags = i < variances.length ? variances[i] : VarianceFlags.Covariant;
19563 else if (variance === VarianceFlags.Covariant) {
21187 … modifiers & ModifierFlags.In ? VarianceFlags.Invariant : VarianceFlags.Covariant :
21199 … variance = (isTypeAssignableTo(typeWithSub, typeWithSuper) ? VarianceFlags.Covariant : 0) |
21252 …if ((variances[i] & VarianceFlags.VarianceMask) === VarianceFlags.Covariant && typeArguments[i].fl…