| 1 | import { |
| 2 | isCallExpressionscip-typescript npm @babel/types 7.20.7 src/validators/generated/`index.ts`/isCallExpression()., |
| 3 | isExpressionStatementscip-typescript npm @babel/types 7.20.7 src/validators/generated/`index.ts`/isExpressionStatement()., |
| 4 | isIdentifierscip-typescript npm @babel/types 7.20.7 src/validators/generated/`index.ts`/isIdentifier()., |
| 5 | isStringLiteralscip-typescript npm @babel/types 7.20.7 src/validators/generated/`index.ts`/isStringLiteral()., |
| 6 | } from "@babel/types"scip-typescript npm @babel/types 7.20.7 src/`index.ts`/; |
| 7 | 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`/; |
| 8 | import type { NodePathscip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath# } from "@babel/traverse"scip-typescript npm @babel/traverse 7.20.13 src/`index.ts`/; |
| 9 | |
| 10 | export function getImportSourcescip-typescript npm @babel/preset-env 7.20.2 src/polyfills/`utils.ts`/getImportSource().({ nodescip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#node. }: NodePathscip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#<tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.ImportDeclarationscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/ImportDeclaration#>) { |
| 11 | if (node.specifiersscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/ImportDeclaration#specifiers..lengthscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Array#length. === 0) return node.sourcescip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/ImportDeclaration#source..valuescip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/StringLiteral#value.; |
| 12 | } |
| 13 | |
| 14 | export function getRequireSourcescip-typescript npm @babel/preset-env 7.20.2 src/polyfills/`utils.ts`/getRequireSource().({ nodescip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#node. }: NodePathscip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#) { |
| 15 | if (!isExpressionStatementscip-typescript npm @babel/types 7.20.7 src/validators/generated/`index.ts`/isExpressionStatement().(node)) return; |
| 16 | const { expressionscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/ExpressionStatement#expression. } = node; |
| 17 | if ( |
| 18 | isCallExpressionscip-typescript npm @babel/types 7.20.7 src/validators/generated/`index.ts`/isCallExpression().(expression) && |
| 19 | isIdentifierscip-typescript npm @babel/types 7.20.7 src/validators/generated/`index.ts`/isIdentifier().(expression.calleescip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/CallExpression#callee.) && |
| 20 | expression.calleescip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/CallExpression#callee..namescip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Identifier#name. === "require" && |
| 21 | expression.argumentsscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/CallExpression#arguments..lengthscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Array#length. === 1 && |
| 22 | isStringLiteralscip-typescript npm @babel/types 7.20.7 src/validators/generated/`index.ts`/isStringLiteral().(expression.argumentsscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/CallExpression#arguments.[0]) |
| 23 | ) { |
| 24 | return expression.argumentsscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/CallExpression#arguments.[0].valuescip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/StringLiteral#value.; |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | export function isPolyfillSourcescip-typescript npm @babel/preset-env 7.20.2 src/polyfills/`utils.ts`/isPolyfillSource().(sourcescip-typescript npm @babel/preset-env 7.20.2 src/polyfills/`utils.ts`/isPolyfillSource().(source)?: string | null): boolean { |
| 29 | return sourcescip-typescript npm @babel/preset-env 7.20.2 src/polyfills/`utils.ts`/isPolyfillSource().(source) === "@babel/polyfill" || sourcescip-typescript npm @babel/preset-env 7.20.2 src/polyfills/`utils.ts`/isPolyfillSource().(source) === "core-js"; |
| 30 | } |