Babel syntax plugin that enables parsing of class properties, private properties, and private methods
94
Build a small parsing utility that accepts JavaScript snippets containing public and private class members and returns the unmodified code plus a parsed AST. The pipeline must rely on a syntax-only plugin so no code transforms are emitted.
@generates
Configure the parsing pipeline to enable class field syntax without registering any transform plugins or helpers.
export function parseClassFeatures(sourceCode);sourceCode: a string of JavaScript containing potential class fields or private members.ast (the parsed program) and code (the output source string after running through the pipeline). code must be exactly the same as the input.Enables parsing of class field syntax without applying transformations.
Install with Tessl CLI
npx tessl i tessl/npm-babel--plugin-syntax-class-properties