mirror of
https://github.com/danbulant/oxc
synced 2026-05-21 21:29:01 +00:00
The regression case in typescript is as expected since we don't
currently store `AccessorProperty` in `ClassTable`.
The following code is one of those cases
```ts
class C1 {
accessor #a: any;
accessor #b = 1;
static accessor #c: any;
static accessor #d = 2;
constructor() {
this.#a = 3;
this.#b = 4;
}
static {
this.#c = 5;
this.#d = 6;
}
}
```
But there was an error
```shell
Expect to Parse: "conformance/classes/propertyMemberDeclarations/autoAccessor2.ts"
× Private field 'a' must be declared in an enclosing class
╭─[conformance/classes/propertyMemberDeclarations/autoAccessor2.ts:9:1]
9 │ constructor() {
10 │ this.#a = 3;
· ──
11 │ this.#b = 4;
╰────
```
Let's leave it alone for now. Because of the `AccessorProperty` I
haven't seen it in any repo.
|
||
|---|---|---|
| .. | ||
| babel@7c29fbc4db | ||
| misc | ||
| src | ||
| test262@467a0fe68f | ||
| typescript@b6121e400c | ||
| Cargo.toml | ||
| codegen_babel.snap | ||
| codegen_misc.snap | ||
| codegen_test262.snap | ||
| codegen_typescript.snap | ||
| minifier_babel.snap | ||
| minifier_test262.snap | ||
| parser_babel.snap | ||
| parser_misc.snap | ||
| parser_test262.snap | ||
| parser_typescript.snap | ||
| README.md | ||
Coverage
The parser is tested against test262, babel and TypeScript for conformance.
Note: tests against regexp are disabled for now.
Clone the test files beforehand:
git submodule update --init
Development
# full run
cargo coverage
cargo coverage js # for test262
cargo coverage babel # for babel
cargo coverage ts # for typescript
# run in watch
cargo watch -x 'coverage js'
# filter for a file path
cargo watch -x 'coverage js --filter filter-file-path'