mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
a980d869b6
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: jakebailey <[email protected]>
21 lines
812 B
Plaintext
21 lines
812 B
Plaintext
varianceModifiersOnClassMembers.ts(4,3): error TS1274: 'in' modifier can only appear on a type parameter of a class, interface or type alias
|
|
varianceModifiersOnClassMembers.ts(5,3): error TS1274: 'out' modifier can only appear on a type parameter of a class, interface or type alias
|
|
|
|
|
|
==== varianceModifiersOnClassMembers.ts (2 errors) ====
|
|
// https://github.com/microsoft/typescript-go/issues/4123
|
|
|
|
class C {
|
|
in x = 1;
|
|
~~
|
|
!!! error TS1274: 'in' modifier can only appear on a type parameter of a class, interface or type alias
|
|
out y = 2;
|
|
~~~
|
|
!!! error TS1274: 'out' modifier can only appear on a type parameter of a class, interface or type alias
|
|
}
|
|
|
|
const isIn = "x" in { x: 1 };
|
|
for (const k in { x: 1 }) {
|
|
console.log(k);
|
|
}
|
|
|