Home
last modified time | relevance | path

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

/third_party/typescript/tests/baselines/reference/
DvarianceAnnotations.types25 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 …]
DvarianceAnnotations.js12 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>;
DconditionalTypes2.types7 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 …]
DvarianceAnnotations.symbols27 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))
DconditionalTypes2.js6 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;
DconditionalTypes2.errors.txt4 …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>'.
DvarianceAnnotations.errors.txt3 …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>'.
DconditionalTypes2.symbols12 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))
DvarianceMeasurement.types116 // Contravariant in A
DvarianceMeasurement.errors.txt111 // Contravariant in A
DvarianceMeasurement.symbols164 // Contravariant in A
/third_party/typescript/tests/cases/conformance/types/typeParameters/typeParameterLists/
DvarianceAnnotations.ts14 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/
DconditionalTypes2.ts8 interface Contravariant<T> { interface
21 function f2<A, B extends A>(a: Contravariant<A>, b: Contravariant<B>) {
/third_party/typescript/src/compiler/
Ddebug.ts774 variance === VarianceFlags.Contravariant ? "in" :
Dtypes.ts5963 Contravariant = 1 << 1, // Contravariant
5964 Bivariant = Covariant | Contravariant, // Both covariant and contravariant
5966 …VarianceMask = Invariant | Covariant | Contravariant | Independent, // Mask containing all measur…
Dchecker.ts19566 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) {