Debian Codegraph @

packages/babel-plugin-proposal-duplicate-named-capturing-groups-regex/src/index.ts

raw symbols SCIP
1 /* eslint-disable @babel/development/plugin-name */
2 import { createRegExpFeaturePlugin } from "@babel/helper-create-regexp-features-plugin";
3 import { declare } from "@babel/helper-plugin-utils";
4
5 export interface Options {
6 runtime?: boolean;
7 }
8
9 export default declare((api, options: Options) => {
10 api.assertVersion("^7.19.0");
11
12 const { runtime } = options;
13 if (runtime !== undefined && typeof runtime !== "boolean") {
14 throw new Error("The 'runtime' option must be boolean");
15 }
16
17 return createRegExpFeaturePlugin({
18 name: "proposal-duplicate-named-capturing-groups-regex",
19 feature: "duplicateNamedCaptureGroups",
20 options: { runtime },
21 });
22 });