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]>
28 lines
532 B
TypeScript
28 lines
532 B
TypeScript
//// [tests/cases/compiler/varianceModifiersOnClassMembers.ts] ////
|
|
|
|
//// [varianceModifiersOnClassMembers.ts]
|
|
// https://github.com/microsoft/typescript-go/issues/4123
|
|
|
|
class C {
|
|
in x = 1;
|
|
out y = 2;
|
|
}
|
|
|
|
const isIn = "x" in { x: 1 };
|
|
for (const k in { x: 1 }) {
|
|
console.log(k);
|
|
}
|
|
|
|
|
|
//// [varianceModifiersOnClassMembers.js]
|
|
"use strict";
|
|
// https://github.com/microsoft/typescript-go/issues/4123
|
|
class C {
|
|
x = 1;
|
|
y = 2;
|
|
}
|
|
const isIn = "x" in { x: 1 };
|
|
for (const k in { x: 1 }) {
|
|
console.log(k);
|
|
}
|