@@ -14852,6 +14852,38 @@ Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typesc
1485214852 ╰────
1485314853 help: Remove the duplicate modifier.
1485414854
14855+ × TS(1274): 'in' modifier can only appear on a type parameter of a class, interface or type alias.
14856+ ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations/input.ts:104:5]
14857+ 103 │ class C {
14858+ 104 │ in a = 0; // Error
14859+ · ──
14860+ 105 │ out b = 0; // Error
14861+ ╰────
14862+
14863+ × TS(1274): 'out' modifier can only appear on a type parameter of a class, interface or type alias.
14864+ ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations/input.ts:105:5]
14865+ 104 │ in a = 0; // Error
14866+ 105 │ out b = 0; // Error
14867+ · ───
14868+ 106 │ }
14869+ ╰────
14870+
14871+ × TS(1274): 'in' modifier can only appear on a type parameter of a class, interface or type alias.
14872+ ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations/input.ts:100:21]
14873+ 99 │
14874+ 100 │ declare function f1<in T>(x: T): void; // Error
14875+ · ────
14876+ 101 │ declare function f2<out T>(): T; // Error
14877+ ╰────
14878+
14879+ × TS(1274): 'out' modifier can only appear on a type parameter of a class, interface or type alias.
14880+ ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations/input.ts:101:21]
14881+ 100 │ declare function f1<in T>(x: T): void; // Error
14882+ 101 │ declare function f2<out T>(): T; // Error
14883+ · ─────
14884+ 102 │
14885+ ╰────
14886+
1485514887 × TS(1273): 'public' modifier cannot be used on a type parameter.
1485614888 ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations-babel-7/input.ts:95:10]
1485714889 94 │
@@ -14878,6 +14910,38 @@ Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typesc
1487814910 ╰────
1487914911 help: Remove the duplicate modifier.
1488014912
14913+ × TS(1274): 'in' modifier can only appear on a type parameter of a class, interface or type alias.
14914+ ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations-babel-7/input.ts:104:5]
14915+ 103 │ class C {
14916+ 104 │ in a = 0; // Error
14917+ · ──
14918+ 105 │ out b = 0; // Error
14919+ ╰────
14920+
14921+ × TS(1274): 'out' modifier can only appear on a type parameter of a class, interface or type alias.
14922+ ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations-babel-7/input.ts:105:5]
14923+ 104 │ in a = 0; // Error
14924+ 105 │ out b = 0; // Error
14925+ · ───
14926+ 106 │ }
14927+ ╰────
14928+
14929+ × TS(1274): 'in' modifier can only appear on a type parameter of a class, interface or type alias.
14930+ ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations-babel-7/input.ts:100:21]
14931+ 99 │
14932+ 100 │ declare function f1<in T>(x: T): void; // Error
14933+ · ────
14934+ 101 │ declare function f2<out T>(): T; // Error
14935+ ╰────
14936+
14937+ × TS(1274): 'out' modifier can only appear on a type parameter of a class, interface or type alias.
14938+ ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations-babel-7/input.ts:101:21]
14939+ 100 │ declare function f1<in T>(x: T): void; // Error
14940+ 101 │ declare function f2<out T>(): T; // Error
14941+ · ─────
14942+ 102 │
14943+ ╰────
14944+
1488114945 × Unexpected token. Did you mean `{'>'}` or `>`?
1488214946 ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations-with-jsx/input.tsx:2:11]
1488314947 1 │ // valid JSX
0 commit comments