Babel syntax plugin that enables parsing of class properties, private properties, and private methods
94
A Babel-focused task to provide syntax-only support for class fields and private methods by wiring parser options while leaving emitted code untouched.
@generates
/**
* Returns a Babel plugin that enables parsing of class feature syntax without emitting transforms.
* Expects Babel's plugin API object as the only argument.
*/
function buildSyntaxPlugin(api);
/**
* Transforms the given source string using @babel/core with only this plugin enabled.
* Resolves with the transformed code string.
*/
async function transformWithSyntaxSupport(source);
module.exports = { buildSyntaxPlugin, transformWithSyntaxSupport };Required to run programmatic transforms in the tests.
Enables parser support for public and private class features when parser options are extended.
Install with Tessl CLI
npx tessl i tessl/npm-babel--plugin-syntax-class-properties