https://github.com/tc39/proposal-private-fields-in-in Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com> Co-Authored-By: Huáng Jùnliàng <jlhwung@gmail.com>
23 lines
517 B
JavaScript
23 lines
517 B
JavaScript
/* eslint-disable @babel/development/plugin-name */
|
|
|
|
import { declare } from "@babel/helper-plugin-utils";
|
|
import {
|
|
createClassFeaturePlugin,
|
|
FEATURES,
|
|
} from "@babel/helper-create-class-features-plugin";
|
|
|
|
export default declare((api, options) => {
|
|
api.assertVersion(7);
|
|
|
|
return createClassFeaturePlugin({
|
|
name: "proposal-class-properties",
|
|
|
|
feature: FEATURES.privateIn,
|
|
loose: options.loose,
|
|
|
|
manipulateOptions(opts, parserOpts) {
|
|
parserOpts.plugins.push("privateIn");
|
|
},
|
|
});
|
|
});
|