swc/crates/swc_ecma_parser/tests/tsc/privateNameAndObjectRestSpread.ts
2022-02-04 17:08:38 +09:00

19 lines
348 B
TypeScript

// @strict: true
// @target: es6
class C {
#prop = 1;
static #propStatic = 1;
method(other: C) {
const obj = { ...other };
obj.#prop;
const { ...rest } = other;
rest.#prop;
const statics = { ... C};
statics.#propStatic
const { ...sRest } = C;
sRest.#propStatic;
}
}