mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
Here implementing the es2015 new target transform, see detail at https://babel.dev/docs/babel-plugin-transform-template-new-target. Here has three kinds need to be distinguished. - `NewTargetKind::Method`, it from `AstKind::ObjectMethod` or `AstKind::MethodDefinitionKind::Get/Set/Method`. It will be transformed to `void 0`. - `NewTargetKind::Constructor`, is from ` AstKind::MethodDefinitionKind::Constructor`. It will be transformed to `this.constructor`. - `NewTargetKind::Function`, is from ` AstKind::Function`, here the function is not the above function. It will be transformed to `this instanceof _target ? this.constructor : void 0`, here `_target` comes from the function name or is created by scope uid ident. |
||
|---|---|---|
| .. | ||
| benchmark | ||
| common | ||
| coverage | ||
| minsize | ||
| prettier_conformance | ||
| rulegen | ||
| transform_conformance | ||
| libs.txt | ||