Searched refs:Contravariant (Results 1 – 16 of 16) sorted by relevance
/third_party/typescript/tests/baselines/reference/ |
D | varianceAnnotations.types | 25 type Contravariant<in T> = { 26 >Contravariant : Contravariant<T> 33 declare let super_contravariant: Contravariant<unknown>; 34 >super_contravariant : Contravariant<unknown> 36 declare let sub_contravariant: Contravariant<string>; 37 >sub_contravariant : Contravariant<string> 40 >super_contravariant = sub_contravariant : Contravariant<string> 41 >super_contravariant : Contravariant<unknown> 42 >sub_contravariant : Contravariant<string> 45 >sub_contravariant = super_contravariant : Contravariant<unknown> [all …]
|
D | varianceAnnotations.js | 12 type Contravariant<in T> = { 16 declare let super_contravariant: Contravariant<unknown>; 17 declare let sub_contravariant: Contravariant<string>; 228 type Contravariant<in T> = { 231 declare let super_contravariant: Contravariant<unknown>; 232 declare let sub_contravariant: Contravariant<string>;
|
D | conditionalTypes2.types | 7 interface Contravariant<T> { 33 function f2<A, B extends A>(a: Contravariant<A>, b: Contravariant<B>) { 34 >f2 : <A, B extends A>(a: Contravariant<A>, b: Contravariant<B>) => void 35 >a : Contravariant<A> 36 >b : Contravariant<B> 39 >a = b : Contravariant<B> 40 >a : Contravariant<A> 41 >b : Contravariant<B> 44 >b = a : Contravariant<A> 45 >b : Contravariant<B> [all …]
|
D | varianceAnnotations.symbols | 27 type Contravariant<in T> = { 28 >Contravariant : Symbol(Contravariant, Decl(varianceAnnotations.ts, 8, 32)) 37 declare let super_contravariant: Contravariant<unknown>; 39 >Contravariant : Symbol(Contravariant, Decl(varianceAnnotations.ts, 8, 32)) 41 declare let sub_contravariant: Contravariant<string>; 43 >Contravariant : Symbol(Contravariant, Decl(varianceAnnotations.ts, 8, 32))
|
D | conditionalTypes2.js | 6 interface Contravariant<T> { 19 function f2<A, B extends A>(a: Contravariant<A>, b: Contravariant<B>) { 332 interface Contravariant<T> { 339 declare function f2<A, B extends A>(a: Contravariant<A>, b: Contravariant<B>): void;
|
D | conditionalTypes2.errors.txt | 4 …onditionalTypes2.ts(19,5): error TS2322: Type 'Contravariant<B>' is not assignable to type 'Contra… 43 interface Contravariant<T> { 61 function f2<A, B extends A>(a: Contravariant<A>, b: Contravariant<B>) { 64 !!! error TS2322: Type 'Contravariant<B>' is not assignable to type 'Contravariant<A>'.
|
D | varianceAnnotations.errors.txt | 3 …nceAnnotations.ts(18,1): error TS2322: Type 'Contravariant<string>' is not assignable to type 'Con… 83 type Contravariant<in T> = { 87 declare let super_contravariant: Contravariant<unknown>; 88 declare let sub_contravariant: Contravariant<string>; 92 !!! error TS2322: Type 'Contravariant<string>' is not assignable to type 'Contravariant<unknown>'.
|
D | conditionalTypes2.symbols | 12 interface Contravariant<T> { 13 >Contravariant : Symbol(Contravariant, Decl(conditionalTypes2.ts, 2, 1)) 17 >foo : Symbol(Contravariant.foo, Decl(conditionalTypes2.ts, 4, 28)) 54 function f2<A, B extends A>(a: Contravariant<A>, b: Contravariant<B>) { 60 >Contravariant : Symbol(Contravariant, Decl(conditionalTypes2.ts, 2, 1)) 63 >Contravariant : Symbol(Contravariant, Decl(conditionalTypes2.ts, 2, 1))
|
D | varianceMeasurement.types | 116 // Contravariant in A
|
D | varianceMeasurement.errors.txt | 111 // Contravariant in A
|
D | varianceMeasurement.symbols | 164 // Contravariant in A
|
/third_party/typescript/tests/cases/conformance/types/typeParameters/typeParameterLists/ |
D | varianceAnnotations.ts | 14 type Contravariant<in T> = { alias 18 declare let super_contravariant: Contravariant<unknown>; 19 declare let sub_contravariant: Contravariant<string>;
|
/third_party/typescript/tests/cases/conformance/types/conditional/ |
D | conditionalTypes2.ts | 8 interface Contravariant<T> { interface 21 function f2<A, B extends A>(a: Contravariant<A>, b: Contravariant<B>) {
|
/third_party/typescript/src/compiler/ |
D | debug.ts | 774 variance === VarianceFlags.Contravariant ? "in" :
|
D | types.ts | 5963 Contravariant = 1 << 1, // Contravariant 5964 Bivariant = Covariant | Contravariant, // Both covariant and contravariant 5966 …VarianceMask = Invariant | Covariant | Contravariant | Independent, // Mask containing all measur…
|
D | checker.ts | 19566 else if (variance === VarianceFlags.Contravariant) { 21188 modifiers & ModifierFlags.In ? VarianceFlags.Contravariant : undefined; 21200 … (isTypeAssignableTo(typeWithSuper, typeWithSub) ? VarianceFlags.Contravariant : 0); 23079 … variances.length && (variances[i] & VarianceFlags.VarianceMask) === VarianceFlags.Contravariant) {
|