| 1 |
import * as helpersscip-typescript npm @babel/helpers 7.20.13 src/`index.ts`/ from "@babel/helpers"scip-typescript npm @babel/helpers 7.20.13 src/`index.ts`/; |
| 2 |
import generatorscip-typescript npm @babel/generator 7.20.14 src/`index.ts`/generate(). from "@babel/generator"scip-typescript npm @babel/generator 7.20.14 src/`index.ts`/; |
| 3 |
import template from "@babel/template"scip-typescript npm @babel/template 7.20.7 src/`index.ts`/; |
| 4 |
import { |
| 5 |
arrayExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/arrayExpression()., |
| 6 |
assignmentExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/assignmentExpression()., |
| 7 |
binaryExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/binaryExpression()., |
| 8 |
blockStatementscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/blockStatement()., |
| 9 |
callExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/callExpression()., |
| 10 |
cloneNodescip-typescript npm @babel/types 7.20.7 src/clone/`cloneNode.ts`/cloneNode()., |
| 11 |
conditionalExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/conditionalExpression()., |
| 12 |
exportNamedDeclarationscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/exportNamedDeclaration()., |
| 13 |
exportSpecifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/exportSpecifier()., |
| 14 |
expressionStatementscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/expressionStatement()., |
| 15 |
functionExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/functionExpression()., |
| 16 |
identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier()., |
| 17 |
memberExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/memberExpression()., |
| 18 |
objectExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/objectExpression()., |
| 19 |
programscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/program()., |
| 20 |
stringLiteralscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/stringLiteral()., |
| 21 |
unaryExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/unaryExpression()., |
| 22 |
variableDeclarationscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/variableDeclaration()., |
| 23 |
variableDeclaratorscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/variableDeclarator()., |
| 24 |
} from "@babel/types"scip-typescript npm @babel/types 7.20.7 src/`index.ts`/; |
| 25 |
import type * as tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/ from "@babel/types"scip-typescript npm @babel/types 7.20.7 src/`index.ts`/; |
| 26 |
import Filescip-typescript npm @babel/core 7.20.12 src/transformation/file/`file.ts`/File# from "../transformation/file/file"scip-typescript npm @babel/core 7.20.12 src/transformation/file/`file.ts`/; |
| •27 |
// @ts-ignore |
| 28 |
import type { PublicReplacements } from "@babel/template/src/options"; |
| 29 |
|
| 30 |
// Wrapped to avoid wasting time parsing this when almost no-one uses |
| 31 |
// build-external-helpers. |
| 32 |
const buildUmdWrapperscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildUmdWrapper. = (replacements: PublicReplacements) => |
| 33 |
template.statementscip-typescript npm @babel/template 7.20.7 src/`index.ts`/statement0:` |
| 34 |
(function (root, factory) { |
| 35 |
if (typeof define === "function" && define.amd) { |
| 36 |
define(AMD_ARGUMENTS, factory); |
| 37 |
} else if (typeof exports === "object") { |
| 38 |
factory(COMMON_ARGUMENTS); |
| 39 |
} else { |
| 40 |
factory(BROWSER_ARGUMENTS); |
| 41 |
} |
| 42 |
})(UMD_ROOT, function (FACTORY_PARAMETERS) { |
| 43 |
FACTORY_BODY |
| 44 |
}); |
| 45 |
`(replacements); |
| 46 |
|
| 47 |
function buildGlobalscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildGlobal().(allowlistscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildGlobal().(allowlist)?: Arrayscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Array#<string>) { |
| 48 |
const namespace = identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier().("babelHelpers"); |
| 49 |
|
| 50 |
const body: tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Statementscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Statement#[] = []; |
| 51 |
const container = functionExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/functionExpression().( |
| 52 |
null, |
| 53 |
[identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier().("global")], |
| 54 |
blockStatementscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/blockStatement().(body), |
| 55 |
); |
| 56 |
const tree = programscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/program().([ |
| 57 |
expressionStatementscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/expressionStatement().( |
| 58 |
callExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/callExpression().(container, [ |
| 59 |
// typeof global === "undefined" ? self : global |
| 60 |
conditionalExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/conditionalExpression().( |
| 61 |
binaryExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/binaryExpression().( |
| 62 |
"===", |
| 63 |
unaryExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/unaryExpression().("typeof", identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier().("global")), |
| 64 |
stringLiteralscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/stringLiteral().("undefined"), |
| 65 |
), |
| 66 |
identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier().("self"), |
| 67 |
identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier().("global"), |
| 68 |
), |
| 69 |
]), |
| 70 |
), |
| 71 |
]); |
| 72 |
|
| 73 |
body.pushscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Array#push().( |
| 74 |
variableDeclarationscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/variableDeclaration().("var", [ |
| 75 |
variableDeclaratorscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/variableDeclarator().( |
| 76 |
namespace, |
| 77 |
assignmentExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/assignmentExpression().( |
| 78 |
"=", |
| 79 |
memberExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/memberExpression().(identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier().("global"), namespace), |
| 80 |
objectExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/objectExpression().([]), |
| 81 |
), |
| 82 |
), |
| 83 |
]), |
| 84 |
); |
| 85 |
|
| 86 |
buildHelpersscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildHelpers().(body, namespace, allowlistscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildGlobal().(allowlist)); |
| 87 |
|
| 88 |
return tree; |
| 89 |
} |
| 90 |
|
| 91 |
function buildModulescip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildModule().(allowlistscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildModule().(allowlist)?: Arrayscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Array#<string>) { |
| 92 |
const body: tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Statementscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Statement#[] = []; |
| 93 |
const refs = buildHelpersscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildHelpers().(body, null, allowlistscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildModule().(allowlist)); |
| 94 |
|
| 95 |
body.unshiftscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Array#unshift().( |
| 96 |
exportNamedDeclarationscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/exportNamedDeclaration().( |
| 97 |
null, |
| 98 |
Objectscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Object#.keysscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/ObjectConstructor#keys().(refs).mapscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Array#map().(name => { |
| 99 |
return exportSpecifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/exportSpecifier().(cloneNodescip-typescript npm @babel/types 7.20.7 src/clone/`cloneNode.ts`/cloneNode().(refs[name]), identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier().(name)); |
| 100 |
}), |
| 101 |
), |
| 102 |
); |
| 103 |
|
| 104 |
return programscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/program().(body, [], "module"); |
| 105 |
} |
| 106 |
|
| 107 |
function buildUmdscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildUmd().(allowlistscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildUmd().(allowlist)?: Arrayscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Array#<string>) { |
| 108 |
const namespace = identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier().("babelHelpers"); |
| 109 |
|
| 110 |
const body: tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Statementscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Statement#[] = []; |
| 111 |
body.pushscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Array#push().( |
| 112 |
variableDeclarationscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/variableDeclaration().("var", [ |
| 113 |
variableDeclaratorscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/variableDeclarator().(namespace, identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier().("global")), |
| 114 |
]), |
| 115 |
); |
| 116 |
|
| 117 |
buildHelpersscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildHelpers().(body, namespace, allowlistscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildUmd().(allowlist)); |
| 118 |
|
| 119 |
return programscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/program().([ |
| 120 |
buildUmdWrapperscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildUmdWrapper.({ |
| 121 |
FACTORY_PARAMETERSscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/FACTORY_PARAMETERS0:: identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier().("global"), |
| 122 |
BROWSER_ARGUMENTSscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/BROWSER_ARGUMENTS0:: assignmentExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/assignmentExpression().( |
| 123 |
"=", |
| 124 |
memberExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/memberExpression().(identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier().("root"), namespace), |
| 125 |
objectExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/objectExpression().([]), |
| 126 |
), |
| 127 |
COMMON_ARGUMENTSscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/COMMON_ARGUMENTS0:: identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier().("exports"), |
| 128 |
AMD_ARGUMENTSscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/AMD_ARGUMENTS0:: arrayExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/arrayExpression().([stringLiteralscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/stringLiteral().("exports")]), |
| 129 |
FACTORY_BODYscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/FACTORY_BODY0:: body, |
| 130 |
UMD_ROOTscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/UMD_ROOT0:: identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier().("this"), |
| 131 |
}), |
| 132 |
]); |
| 133 |
} |
| 134 |
|
| 135 |
function buildVarscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildVar().(allowlistscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildVar().(allowlist)?: Arrayscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Array#<string>) { |
| 136 |
const namespace = identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier().("babelHelpers"); |
| 137 |
|
| 138 |
const body: tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Statementscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Statement#[] = []; |
| 139 |
body.pushscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Array#push().( |
| 140 |
variableDeclarationscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/variableDeclaration().("var", [ |
| 141 |
variableDeclaratorscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/variableDeclarator().(namespace, objectExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/objectExpression().([])), |
| 142 |
]), |
| 143 |
); |
| 144 |
const tree = programscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/program().(body); |
| 145 |
buildHelpersscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildHelpers().(body, namespace, allowlistscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildVar().(allowlist)); |
| 146 |
body.pushscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Array#push().(expressionStatementscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/expressionStatement().(namespace)); |
| 147 |
return tree; |
| 148 |
} |
| 149 |
|
| 150 |
function buildHelpersscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildHelpers().( |
| 151 |
bodyscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildHelpers().(body): tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Statementscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Statement#[], |
| 152 |
namespacescip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildHelpers().(namespace): tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Expressionscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Expression#, |
| 153 |
allowlistscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildHelpers().(allowlist)?: Arrayscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Array#<string>, |
| 154 |
): Recordscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Record#<string, tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.MemberExpressionscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/MemberExpression#>; |
| 155 |
function buildHelpersscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildHelpers().( |
| 156 |
bodyscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildHelpers().(body): tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Statementscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Statement#[], |
| 157 |
namespacescip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildHelpers().(namespace): null, |
| 158 |
allowlistscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildHelpers().(allowlist)?: Arrayscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Array#<string>, |
| 159 |
): Recordscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Record#<string, tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Identifierscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Identifier#>; |
| 160 |
|
| 161 |
function buildHelpersscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildHelpers().( |
| 162 |
bodyscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildHelpers().(body): tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Statementscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Statement#[], |
| 163 |
namespacescip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildHelpers().(namespace): tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Expressionscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Expression# | null, |
| 164 |
allowlistscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildHelpers().(allowlist)?: Arrayscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Array#<string>, |
| 165 |
) { |
| 166 |
const getHelperReference = (name: string) => { |
| 167 |
return namespacescip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildHelpers().(namespace) |
| 168 |
? memberExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/memberExpression().(namespacescip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildHelpers().(namespace), identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier().(name)) |
| 169 |
: identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier().(`_${name}`); |
| 170 |
}; |
| 171 |
|
| 172 |
const refs: { [key: string]: tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Identifierscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Identifier# | tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.MemberExpressionscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/MemberExpression# } = {}; |
| 173 |
helpersscip-typescript npm @babel/helpers 7.20.13 src/`index.ts`/.listscip-typescript npm @babel/helpers 7.20.13 src/`index.ts`/list..forEachscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Array#forEach().(function (name) { |
| 174 |
if (allowlistscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildHelpers().(allowlist) && allowlistscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildHelpers().(allowlist).indexOfscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Array#indexOf().(name) < 0) return; |
| 175 |
|
| 176 |
const ref = (refs[name] = getHelperReference(name)); |
| 177 |
|
| 178 |
helpersscip-typescript npm @babel/helpers 7.20.13 src/`index.ts`/.ensurescip-typescript npm @babel/helpers 7.20.13 src/`index.ts`/ensure().(name, Filescip-typescript npm @babel/core 7.20.12 src/transformation/file/`file.ts`/File#); |
| 179 |
const { nodes } = helpersscip-typescript npm @babel/helpers 7.20.13 src/`index.ts`/.getscip-typescript npm @babel/helpers 7.20.13 src/`index.ts`/get().(name, getHelperReference, ref); |
| 180 |
|
| 181 |
bodyscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildHelpers().(body).pushscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Array#push().(...nodes); |
| 182 |
}); |
| 183 |
return refs; |
| 184 |
} |
| 185 |
export default function ( |
| 186 |
allowlist?: Arrayscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Array#<string>, |
| 187 |
outputType: "global" | "module" | "umd" | "var" = "global", |
| 188 |
) { |
| 189 |
let tree: tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Programscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Program#; |
| 190 |
|
| 191 |
const build = { |
| 192 |
globalscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/global0:: buildGlobalscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildGlobal()., |
| 193 |
modulescip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/module0:: buildModulescip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildModule()., |
| 194 |
umdscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/umd0:: buildUmdscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildUmd()., |
| 195 |
varscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/var0:: buildVarscip-typescript npm @babel/core 7.20.12 src/tools/`build-external-helpers.ts`/buildVar()., |
| 196 |
}[outputType]; |
| 197 |
|
| 198 |
if (build) { |
| 199 |
tree = build(allowlist); |
| 200 |
} else { |
| 201 |
throw new Errorscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Error#(`Unsupported output type ${outputType}`); |
| 202 |
} |
| 203 |
|
| 204 |
return generatorscip-typescript npm @babel/generator 7.20.14 src/`index.ts`/generate().(tree).codescip-typescript npm @babel/generator 7.20.14 src/`buffer.ts`/code0:; |
| 205 |
} |