@@ -14878,6 +14878,38 @@ Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typesc
1487814878 ╰────
1487914879 help: Remove the duplicate modifier.
1488014880
14881+ × TS(1274): 'in' modifier can only appear on a type parameter of a class, interface or type alias.
14882+ ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations/input.ts:104:5]
14883+ 103 │ class C {
14884+ 104 │ in a = 0; // Error
14885+ · ──
14886+ 105 │ out b = 0; // Error
14887+ ╰────
14888+
14889+ × TS(1274): 'out' modifier can only appear on a type parameter of a class, interface or type alias.
14890+ ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations/input.ts:105:5]
14891+ 104 │ in a = 0; // Error
14892+ 105 │ out b = 0; // Error
14893+ · ───
14894+ 106 │ }
14895+ ╰────
14896+
14897+ × TS(1274): 'in' modifier can only appear on a type parameter of a class, interface or type alias.
14898+ ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations/input.ts:100:21]
14899+ 99 │
14900+ 100 │ declare function f1<in T>(x: T): void; // Error
14901+ · ────
14902+ 101 │ declare function f2<out T>(): T; // Error
14903+ ╰────
14904+
14905+ × TS(1274): 'out' modifier can only appear on a type parameter of a class, interface or type alias.
14906+ ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations/input.ts:101:21]
14907+ 100 │ declare function f1<in T>(x: T): void; // Error
14908+ 101 │ declare function f2<out T>(): T; // Error
14909+ · ─────
14910+ 102 │
14911+ ╰────
14912+
1488114913 × TS(1273): 'public' modifier cannot be used on a type parameter.
1488214914 ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations-babel-7/input.ts:95:10]
1488314915 94 │
@@ -14904,6 +14936,38 @@ Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typesc
1490414936 ╰────
1490514937 help: Remove the duplicate modifier.
1490614938
14939+ × TS(1274): 'in' modifier can only appear on a type parameter of a class, interface or type alias.
14940+ ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations-babel-7/input.ts:104:5]
14941+ 103 │ class C {
14942+ 104 │ in a = 0; // Error
14943+ · ──
14944+ 105 │ out b = 0; // Error
14945+ ╰────
14946+
14947+ × TS(1274): 'out' modifier can only appear on a type parameter of a class, interface or type alias.
14948+ ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations-babel-7/input.ts:105:5]
14949+ 104 │ in a = 0; // Error
14950+ 105 │ out b = 0; // Error
14951+ · ───
14952+ 106 │ }
14953+ ╰────
14954+
14955+ × TS(1274): 'in' modifier can only appear on a type parameter of a class, interface or type alias.
14956+ ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations-babel-7/input.ts:100:21]
14957+ 99 │
14958+ 100 │ declare function f1<in T>(x: T): void; // Error
14959+ · ────
14960+ 101 │ declare function f2<out T>(): T; // Error
14961+ ╰────
14962+
14963+ × TS(1274): 'out' modifier can only appear on a type parameter of a class, interface or type alias.
14964+ ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations-babel-7/input.ts:101:21]
14965+ 100 │ declare function f1<in T>(x: T): void; // Error
14966+ 101 │ declare function f2<out T>(): T; // Error
14967+ · ─────
14968+ 102 │
14969+ ╰────
14970+
1490714971 × Unexpected token. Did you mean `{'>'}` or `>`?
1490814972 ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations-with-jsx/input.tsx:2:11]
1490914973 1 │ // valid JSX
0 commit comments