repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-syntax-jsx/src/index.ts | packages/babel-plugin-syntax-jsx/src/index.ts | import { declare } from "@babel/helper-plugin-utils";
export default declare(api => {
api.assertVersion(REQUIRED_VERSION("^7.0.0-0 || ^8.0.0-0"));
return {
name: "syntax-jsx",
manipulateOptions(opts, parserOpts) {
parserOpts.plugins.push("jsx");
},
};
});
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/scripts/generators/validators.ts | packages/babel-traverse/scripts/generators/validators.ts | import * as t from "@babel/types";
export default function generateValidators() {
let output = `/*
* This file is auto-generated! Do not modify it directly.
* To re-generate run 'make build'
*/
import type * as t from "@babel/types";
import type NodePath from "../index";
import type { VirtualTypeNodePathValidator... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/scripts/generators/visitor-types.ts | packages/babel-traverse/scripts/generators/visitor-types.ts | import * as t from "@babel/types";
export default function generateVisitorTypes() {
const aliases = Object.keys(t.FLIPPED_ALIAS_KEYS).sort();
const types = t.TYPES.filter(
type => !Object.hasOwn(t.FLIPPED_ALIAS_KEYS, type)
).sort();
let output = `/*
* This file is auto-generated! Do not modify it directl... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/scripts/generators/asserts.ts | packages/babel-traverse/scripts/generators/asserts.ts | import * as t from "@babel/types";
export default function generateAsserts() {
let output = `/*
* This file is auto-generated! Do not modify it directly.
* To re-generate run 'make build'
*/
import type * as t from "@babel/types";
import type NodePath from "../index";
type Options<Obj> = Partial<{
[Prop in Exc... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/traverse-node.ts | packages/babel-traverse/src/traverse-node.ts | import TraversalContext from "./context.ts";
import { Hub, type ExplodedTraverseOptions } from "./index.ts";
import NodePath from "./path/index.ts";
import type Scope from "./scope/index.ts";
import type * as t from "@babel/types";
import { VISITOR_KEYS } from "@babel/types";
import { _call, popContext, pushContext, re... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/hub.ts | packages/babel-traverse/src/hub.ts | import type Scope from "./scope/index.ts";
import type { Node } from "@babel/types";
export interface HubInterface {
getCode(): string | void;
getScope(): Scope | void;
addHelper(name: string): any;
buildError(node: Node, msg: string, Error: new (msg: string) => Error): Error;
}
export default class Hub imple... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/visitors.ts | packages/babel-traverse/src/visitors.ts | import * as virtualTypes from "./path/lib/virtual-types.ts";
import * as virtualTypesValidators from "./path/lib/virtual-types-validator.ts";
import type { Node } from "@babel/types";
import {
DEPRECATED_KEYS,
DEPRECATED_ALIASES,
FLIPPED_ALIAS_KEYS,
TYPES,
__internal__deprecationWarning as deprecationWarning,... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/cache.ts | packages/babel-traverse/src/cache.ts | import type { Node } from "@babel/types";
import type NodePath from "./path/index.ts";
import type Scope from "./scope/index.ts";
let pathsCache = new WeakMap<Node, Map<Node, NodePath>>();
export { pathsCache as path };
export let scope = new WeakMap<Node, Scope>();
export function clear() {
clearPath();
clearSco... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/types.ts | packages/babel-traverse/src/types.ts | import type * as t from "@babel/types";
import type { NodePath } from "./index.ts";
import type { VirtualTypeAliases } from "./path/lib/virtual-types.ts";
import type {
ExplVisitorBase,
VisitorBaseNodes,
VisitorBaseAliases,
} from "./generated/visitor-types.d.ts";
export type VisitPhase = "enter" | "exit";
inte... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/context.ts | packages/babel-traverse/src/context.ts | import NodePath from "./path/index.ts";
import { VISITOR_KEYS } from "@babel/types";
import type Scope from "./scope/index.ts";
import type { ExplodedTraverseOptions } from "./index.ts";
import type * as t from "@babel/types";
import type { Visitor } from "./types.ts";
import { popContext, pushContext, resync } from ".... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/index.ts | packages/babel-traverse/src/index.ts | import "./path/context.ts"; // We have some cycles, this ensures correct order to avoid TDZ
import * as visitors from "./visitors.ts";
import {
VISITOR_KEYS,
removeProperties,
type RemovePropertiesOptions,
traverseFast,
} from "@babel/types";
import type * as t from "@babel/types";
import * as cache from "./cac... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/scope/traverseForScope.ts | packages/babel-traverse/src/scope/traverseForScope.ts | import { VISITOR_KEYS } from "@babel/types";
import type * as t from "@babel/types";
import type { HubInterface, Visitor } from "../index.ts";
import { NodePath } from "../index.ts";
import { explode } from "../visitors.ts";
import { _forceSetScope } from "../path/context.ts";
export default function traverseForScope(... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/scope/binding.ts | packages/babel-traverse/src/scope/binding.ts | import type NodePath from "../path/index.ts";
import type * as t from "@babel/types";
import type Scope from "./index.ts";
export type BindingKind =
| "var" /* var declarator */
| "let" /* let declarator, class declaration id, catch clause parameters */
| "const" /* const/using/await using declarator */
| "mod... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/scope/index.ts | packages/babel-traverse/src/scope/index.ts | import Renamer from "./lib/renamer.ts";
import type NodePath from "../path/index.ts";
import traverse from "../index.ts";
import traverseForScope from "./traverseForScope.ts";
import Binding from "./binding.ts";
import type { BindingKind } from "./binding.ts";
import globalsBuiltinLower from "@babel/helper-globals/data... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | true |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/scope/lib/renamer.ts | packages/babel-traverse/src/scope/lib/renamer.ts | import type Binding from "../binding.ts";
import * as t from "@babel/types";
import type { NodePath, Visitor } from "../../index.ts";
import { traverseNode } from "../../traverse-node.ts";
import { explode } from "../../visitors.ts";
import { getAssignmentIdentifiers, type Identifier } from "@babel/types";
const renam... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/generated/visitor-types.d.ts | packages/babel-traverse/src/generated/visitor-types.d.ts | /*
* This file is auto-generated! Do not modify it directly.
* To re-generate run 'make build'
*/
import type * as t from "@babel/types";
import type { ExplVisitNode, VisitNode } from "../types.ts";
export interface ExplVisitorBase<S> {
AnyTypeAnnotation?: ExplVisitNode<S, t.AnyTypeAnnotation>;
ArgumentPlaceho... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/path/introspection.ts | packages/babel-traverse/src/path/introspection.ts | // This file contains methods responsible for introspecting the current path for certain values.
import type NodePath from "./index.ts";
import {
STATEMENT_OR_BLOCK_KEYS,
VISITOR_KEYS,
isBlockStatement,
isExpression,
isIdentifier,
isLiteral,
isStringLiteral,
isType,
matchesPattern as _matchesPattern,... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/path/family.ts | packages/babel-traverse/src/path/family.ts | // This file contains methods responsible for dealing with/retrieving children or siblings.
import type TraversalContext from "../context.ts";
import NodePath from "./index.ts";
import {
getAssignmentIdentifiers as _getAssignmentIdentifiers,
getBindingIdentifiers as _getBindingIdentifiers,
getOuterBindingIdentif... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/path/replacement.ts | packages/babel-traverse/src/path/replacement.ts | // This file contains methods responsible for replacing a node with another.
import { codeFrameColumns } from "@babel/code-frame";
import traverse from "../index.ts";
import NodePath from "./index.ts";
import { getCachedPaths } from "../cache.ts";
import { _verifyNodeList, _containerInsertAfter } from "./modification.... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/path/removal.ts | packages/babel-traverse/src/path/removal.ts | // This file contains methods responsible for removing a node.
import { hooks } from "./lib/removal-hooks.ts";
import { getCachedPaths } from "../cache.ts";
import { _replaceWith } from "./replacement.ts";
import type NodePath from "./index.ts";
import { REMOVED, SHOULD_SKIP } from "./index.ts";
import * as t from "@b... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/path/conversion.ts | packages/babel-traverse/src/path/conversion.ts | // This file contains methods that convert the path node into another node or some other type of data.
import {
arrowFunctionExpression,
assignmentExpression,
binaryExpression,
blockStatement,
callExpression,
conditionalExpression,
expressionStatement,
identifier,
isIdentifier,
jsxIdentifier,
log... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/path/comments.ts | packages/babel-traverse/src/path/comments.ts | // This file contains methods responsible for dealing with comments.
import type * as t from "@babel/types";
import type NodePath from "./index.ts";
import {
addComment as _addComment,
addComments as _addComments,
} from "@babel/types";
/**
* Share comments amongst siblings.
*/
export function shareCommentsWith... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/path/ancestry.ts | packages/babel-traverse/src/path/ancestry.ts | // This file contains that retrieve or validate anything related to the current paths ancestry.
import { VISITOR_KEYS } from "@babel/types";
import type * as t from "@babel/types";
import type NodePath from "./index.ts";
/**
* Starting at the parent path of the current `NodePath` and going up the
* tree, return the... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/path/context.ts | packages/babel-traverse/src/path/context.ts | // This file contains methods responsible for maintaining a TraversalContext.
import { traverseNode } from "../traverse-node.ts";
import { SHOULD_SKIP, SHOULD_STOP } from "./index.ts";
import { _markRemoved } from "./removal.ts";
import type TraversalContext from "../context.ts";
import type { VisitPhase } from "../ty... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/path/index.ts | packages/babel-traverse/src/path/index.ts | import type { HubInterface } from "../hub.ts";
import type TraversalContext from "../context.ts";
import type { ExplodedTraverseOptions } from "../index.ts";
import * as virtualTypes from "./lib/virtual-types.ts";
import { createDebug } from "obug";
import traverse from "../index.ts";
import type { Visitor } from "../t... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/path/modification.ts | packages/babel-traverse/src/path/modification.ts | // This file contains methods that modify the path/node in some ways.
import { getCachedPaths } from "../cache.ts";
import NodePath from "./index.ts";
import { _getQueueContexts, pushContext, setScope } from "./context.ts";
import { _assertUnremoved } from "./removal.ts";
import {
arrowFunctionExpression,
assertEx... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/path/evaluation.ts | packages/babel-traverse/src/path/evaluation.ts | import type NodePath from "./index.ts";
import type * as t from "@babel/types";
// This file contains Babels metainterpreter that can evaluate static code.
const VALID_OBJECT_CALLEES = ["Number", "String", "Math"] as const;
const VALID_IDENTIFIER_CALLEES = [
"isFinite",
"isNaN",
"parseFloat",
"parseInt",
"d... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/path/lib/removal-hooks.ts | packages/babel-traverse/src/path/lib/removal-hooks.ts | // this file contains hooks that handle ancestry cleanup of parent nodes when removing children
import type NodePath from "../index.ts";
import type * as t from "@babel/types";
/**
* Pre hooks should be used for either rejecting removal or delegating removal
*/
export const hooks = [
function (self: NodePath, par... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/path/lib/virtual-types.ts | packages/babel-traverse/src/path/lib/virtual-types.ts | import type * as t from "@babel/types";
export interface VirtualTypeAliases {
BindingIdentifier: t.Identifier;
BlockScoped:
| t.FunctionDeclaration
| t.ClassDeclaration
| t.VariableDeclaration;
ExistentialTypeParam: t.ExistsTypeAnnotation;
Expression: t.Expression;
Flow: t.Flow | t.ImportDeclarat... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/path/lib/virtual-types-validator.ts | packages/babel-traverse/src/path/lib/virtual-types-validator.ts | import type NodePath from "../index.ts";
import {
isBinding,
isBlockScoped as nodeIsBlockScoped,
isExportDeclaration,
isExpression as nodeIsExpression,
isFlow as nodeIsFlow,
isForStatement,
isForXStatement,
isIdentifier,
isImportDeclaration,
isImportSpecifier,
isJSXIdentifier,
isJSXMemberExpress... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/path/generated/asserts.d.ts | packages/babel-traverse/src/path/generated/asserts.d.ts | /*
* This file is auto-generated! Do not modify it directly.
* To re-generate run 'make build'
*/
import type * as t from "@babel/types";
import type NodePath from "../index";
type Options<Obj> = Partial<{
[Prop in Exclude<keyof Obj, "type">]: Obj[Prop] extends t.Node
? t.Node
: Obj[Prop] extends t.Node[]... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | true |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/path/generated/validators.d.ts | packages/babel-traverse/src/path/generated/validators.d.ts | /*
* This file is auto-generated! Do not modify it directly.
* To re-generate run 'make build'
*/
import type * as t from "@babel/types";
import type NodePath from "../index";
import type { VirtualTypeNodePathValidators } from "../lib/virtual-types-validator";
type Options<Obj> = Partial<{
[Prop in Exclude<keyof ... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | true |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/path/inference/util.ts | packages/babel-traverse/src/path/inference/util.ts | import {
createFlowUnionType,
createTSUnionType,
isFlowType,
isTSType,
} from "@babel/types";
import type * as t from "@babel/types";
export function createUnionType(
types: (t.FlowType | t.TSType)[],
): t.FlowType | t.TSType | undefined {
if (types.every(v => isFlowType(v))) {
return createFlowUnionTy... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/path/inference/inferer-reference.ts | packages/babel-traverse/src/path/inference/inferer-reference.ts | import type NodePath from "../index.ts";
import {
BOOLEAN_NUMBER_BINARY_OPERATORS,
createTypeAnnotationBasedOnTypeof,
numberTypeAnnotation,
voidTypeAnnotation,
} from "@babel/types";
import type * as t from "@babel/types";
import type Binding from "../../scope/binding.ts";
import { createUnionType } from "./ut... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/path/inference/index.ts | packages/babel-traverse/src/path/inference/index.ts | import type NodePath from "../index.ts";
import * as inferers from "./inferers.ts";
import {
anyTypeAnnotation,
isAnyTypeAnnotation,
isArrayTypeAnnotation,
isBooleanTypeAnnotation,
isEmptyTypeAnnotation,
isFlowBaseAnnotation,
isGenericTypeAnnotation,
isIdentifier,
isMixedTypeAnnotation,
isNumberType... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/src/path/inference/inferers.ts | packages/babel-traverse/src/path/inference/inferers.ts | import {
BOOLEAN_BINARY_OPERATORS,
BOOLEAN_UNARY_OPERATORS,
NUMBER_BINARY_OPERATORS,
NUMBER_UNARY_OPERATORS,
STRING_UNARY_OPERATORS,
anyTypeAnnotation,
arrayTypeAnnotation,
booleanTypeAnnotation,
buildMatchMemberExpression,
genericTypeAnnotation,
identifier,
nullLiteralTypeAnnotation,
numberTy... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/test/index.tst.ts | packages/babel-traverse/test/index.tst.ts | import { expect, it, describe } from "tstyche";
import type { NodePath } from "../src/index.ts";
import type * as t from "@babel/types";
describe("traverse", () => {
describe("NodePath#get", () => {
it("TryStatement.handler.body", () => {
const path = {} as NodePath<t.TryStatement>;
const body = path... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/test/fixtures/regression/duplicate-variable-in-different-module-ts/input.ts | packages/babel-traverse/test/fixtures/regression/duplicate-variable-in-different-module-ts/input.ts | type T = number;
declare module 'test' {
import type { JSONSchema7 } from 'json-schema';
import { bar } from "baz";
export { fooBar } from "baz";
let foo: JSONSchema7;
// can reference type outsider module
let baz: T;
}
declare module 'test/submodule' {
import type { JSONSchema7 } from 'json-schema';
i... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-traverse/test/fixtures/regression/visit-tsfunctiontype-parameters/input.ts | packages/babel-traverse/test/fixtures/regression/visit-tsfunctiontype-parameters/input.ts | let x: (number) => void;
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-modules-commonjs/src/lazy.ts | packages/babel-plugin-transform-modules-commonjs/src/lazy.ts | import { template, types as t } from "@babel/core";
import { isSideEffectImport } from "@babel/helper-module-transforms";
import type { CommonJSHook } from "./hooks.ts";
type Lazy = boolean | string[] | ((source: string) => boolean);
export const lazyImportsHook = (lazy: Lazy): CommonJSHook => ({
name: `${PACKAGE_J... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-modules-commonjs/src/index.ts | packages/babel-plugin-transform-modules-commonjs/src/index.ts | import { declare } from "@babel/helper-plugin-utils";
import {
isModule,
rewriteModuleStatementsAndPrepareHeader,
type RewriteModuleStatementsAndPrepareHeaderOptions,
isSideEffectImport,
buildNamespaceInitStatements,
ensureStatementsHoisted,
wrapInterop,
getModuleName,
} from "@babel/helper-module-trans... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-modules-commonjs/src/dynamic-import.ts | packages/babel-plugin-transform-modules-commonjs/src/dynamic-import.ts | // Heavily inspired by
// https://github.com/airbnb/babel-plugin-dynamic-import-node/blob/master/src/utils.js
import type { File, NodePath } from "@babel/core";
import { types as t, template } from "@babel/core";
import { buildDynamicImport } from "@babel/helper-module-transforms";
const requireNoInterop = (source: t... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-modules-commonjs/src/hooks.ts | packages/babel-plugin-transform-modules-commonjs/src/hooks.ts | import type { types as t, File } from "@babel/core";
import type { isSideEffectImport } from "@babel/helper-module-transforms";
const commonJSHooksKey =
"@babel/plugin-transform-modules-commonjs/customWrapperPlugin";
type SourceMetadata = Parameters<typeof isSideEffectImport>[0];
// A hook exposes a set of functio... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-modules-commonjs/test/fixtures/integration/missing-ts-plugin-type-assertion-legacy/input.ts | packages/babel-plugin-transform-modules-commonjs/test/fixtures/integration/missing-ts-plugin-type-assertion-legacy/input.ts | import { A } from "x";
var x = {} as A.b[0];
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-modules-commonjs/test/fixtures/integration/missing-ts-plugin/input.ts | packages/babel-plugin-transform-modules-commonjs/test/fixtures/integration/missing-ts-plugin/input.ts | import A from "x";
export function fn(x: A) {
return A.method(x);
}
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-modules-commonjs/test/fixtures/integration/missing-ts-plugin-deep/input.ts | packages/babel-plugin-transform-modules-commonjs/test/fixtures/integration/missing-ts-plugin-deep/input.ts | import A from "x";
export function fn(x: A.b[2]) {
return A.method(x);
}
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-modules-commonjs/test/fixtures/integration/missing-ts-plugin-type-assertion/input.ts | packages/babel-plugin-transform-modules-commonjs/test/fixtures/integration/missing-ts-plugin-type-assertion/input.ts | import { A } from "x";
var x = <A.b[0]> {};
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining/src/util.ts | packages/babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining/src/util.ts | import { skipTransparentExprWrappers } from "@babel/helper-skip-transparent-expression-wrappers";
import { types as t, type NodePath } from "@babel/core";
// https://crbug.com/v8/11558
// check if there is a spread element followed by another argument.
// (...[], 0) or (...[], ...[])
function matchAffectedArguments(a... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining/src/index.ts | packages/babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining/src/index.ts | import { declare } from "@babel/helper-plugin-utils";
import { transform } from "@babel/plugin-transform-optional-chaining";
import { shouldTransform } from "./util.ts";
import type { NodePath, types as t } from "@babel/core";
export default declare(api => {
api.assertVersion(REQUIRED_VERSION(7));
const noDocumen... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-syntax-async-do-expressions/src/index.ts | packages/babel-plugin-syntax-async-do-expressions/src/index.ts | import { declare } from "@babel/helper-plugin-utils";
export default declare(api => {
api.assertVersion(REQUIRED_VERSION("^7.0.0-0 || ^8.0.0-0"));
return {
name: "syntax-async-do-expressions",
manipulateOptions(opts, parserOpts) {
parserOpts.plugins.push("asyncDoExpressions", "doExpressions");
... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-syntax-import-source/src/index.ts | packages/babel-plugin-syntax-import-source/src/index.ts | import { declare } from "@babel/helper-plugin-utils";
export default declare(api => {
api.assertVersion(REQUIRED_VERSION("^7.22.0 || ^8.0.0-0"));
return {
name: "syntax-import-source",
manipulateOptions({ parserOpts }) {
parserOpts.plugins.push("sourcePhaseImports");
parserOpts.createImportExp... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-helper-module-imports/src/import-injector.ts | packages/babel-helper-module-imports/src/import-injector.ts | import assert from "node:assert";
import {
identifier,
importSpecifier,
numericLiteral,
sequenceExpression,
isImportDeclaration,
} from "@babel/types";
import type * as t from "@babel/types";
import type { NodePath, Scope, HubInterface } from "@babel/traverse";
import ImportBuilder from "./import-builder.ts"... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-helper-module-imports/src/import-builder.ts | packages/babel-helper-module-imports/src/import-builder.ts | import assert from "node:assert";
import {
callExpression,
cloneNode,
expressionStatement,
identifier,
importDeclaration,
importDefaultSpecifier,
importNamespaceSpecifier,
importSpecifier,
memberExpression,
stringLiteral,
variableDeclaration,
variableDeclarator,
} from "@babel/types";
import typ... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-helper-module-imports/src/is-module.ts | packages/babel-helper-module-imports/src/is-module.ts | import type { NodePath } from "@babel/traverse";
import type * as t from "@babel/types";
/**
* A small utility to check if a file qualifies as a module.
*/
export default function isModule(path: NodePath<t.Program>) {
return path.node.sourceType === "module";
}
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-helper-module-imports/src/index.ts | packages/babel-helper-module-imports/src/index.ts | import ImportInjector, { type ImportOptions } from "./import-injector.ts";
import type { NodePath } from "@babel/traverse";
import type * as t from "@babel/types";
export { ImportInjector };
export { default as isModule } from "./is-module.ts";
export function addDefault(
path: NodePath,
importedSource: string,
... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/src/util.ts | packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/src/util.ts | import type { NodePath, types as t } from "@babel/core";
/**
* Check whether a function expression can be affected by
* https://bugs.webkit.org/show_bug.cgi?id=220517
* @param path The function expression NodePath
* @returns the name of function id if it should be transformed, otherwise returns false
*/
export fu... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/src/index.ts | packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/src/index.ts | import { declare } from "@babel/helper-plugin-utils";
import { shouldTransform } from "./util.ts";
export default declare(api => {
api.assertVersion(REQUIRED_VERSION("^7.16.0"));
return {
name: "plugin-bugfix-safari-id-destructuring-collision-in-function-expression",
visitor: {
FunctionExpression(p... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-syntax-destructuring-private/src/index.ts | packages/babel-plugin-syntax-destructuring-private/src/index.ts | import { declare } from "@babel/helper-plugin-utils";
export default declare(api => {
api.assertVersion(REQUIRED_VERSION("^7.0.0-0 || ^8.0.0-0"));
return {
name: "syntax-destructuring-private",
manipulateOptions(_, parserOpts) {
parserOpts.plugins.push("destructuringPrivate");
},
};
});
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-syntax-optional-chaining-assign/src/index.ts | packages/babel-plugin-syntax-optional-chaining-assign/src/index.ts | import { declare } from "@babel/helper-plugin-utils";
import { OptionValidator } from "@babel/helper-validator-option";
const v = new OptionValidator(PACKAGE_JSON.name);
export interface Options {
version: "2023-07";
}
export default declare((api, options: Options) => {
api.assertVersion(REQUIRED_VERSION("^7.23.... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-flow-comments/src/index.ts | packages/babel-plugin-transform-flow-comments/src/index.ts | import { declare } from "@babel/helper-plugin-utils";
import syntaxFlow from "@babel/plugin-syntax-flow";
import { types as t, type NodePath } from "@babel/core";
import generateCode from "@babel/generator";
export default declare(api => {
api.assertVersion(REQUIRED_VERSION(7));
function commentFromString(comment... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-helper-wrap-function/src/index.ts | packages/babel-helper-wrap-function/src/index.ts | import type { NodePath } from "@babel/traverse";
import template from "@babel/template";
import {
blockStatement,
callExpression,
functionExpression,
isAssignmentPattern,
isFunctionDeclaration,
isRestElement,
returnStatement,
isCallExpression,
memberExpression,
identifier,
thisExpression,
isPatt... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-proposal-pipeline-operator/src/minimalVisitor.ts | packages/babel-plugin-proposal-pipeline-operator/src/minimalVisitor.ts | import { types as t } from "@babel/core";
import type { PluginPass, NodePath, Visitor } from "@babel/core";
import buildOptimizedSequenceExpression from "./buildOptimizedSequenceExpression.ts";
const minimalVisitor: Visitor<PluginPass> = {
BinaryExpression(path) {
const { scope, node } = path;
const { operat... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-proposal-pipeline-operator/src/smartVisitor.ts | packages/babel-plugin-proposal-pipeline-operator/src/smartVisitor.ts | import { types as t } from "@babel/core";
import type { PluginPass, Visitor } from "@babel/core";
const updateTopicReferenceVisitor: Visitor<{ topicId: t.Identifier }> = {
PipelinePrimaryTopicReference(path) {
path.replaceWith(t.cloneNode(this.topicId));
},
PipelineTopicExpression(path) {
path.skip();
... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-proposal-pipeline-operator/src/hackVisitor.ts | packages/babel-plugin-proposal-pipeline-operator/src/hackVisitor.ts | import { types as t } from "@babel/core";
import type { PluginPass, NodePath, Visitor } from "@babel/core";
type State = {
topicReferences: NodePath<t.TopicReference>[];
sideEffectsBeforeFirstTopicReference: boolean;
};
const topicReferenceVisitor: Visitor<State> = {
exit(path, state) {
if (path.isTopicRefe... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-proposal-pipeline-operator/src/fsharpVisitor.ts | packages/babel-plugin-proposal-pipeline-operator/src/fsharpVisitor.ts | import { types as t, type PluginObject, type NodePath } from "@babel/core";
import buildOptimizedSequenceExpression from "./buildOptimizedSequenceExpression.ts";
const fsharpVisitor: PluginObject["visitor"] = {
BinaryExpression(path) {
const { scope, node } = path;
const { operator, left, right } = node;
... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-proposal-pipeline-operator/src/buildOptimizedSequenceExpression.ts | packages/babel-plugin-proposal-pipeline-operator/src/buildOptimizedSequenceExpression.ts | import { types as t, type NodePath } from "@babel/core";
// tries to optimize sequence expressions in the format
// (a = b, (c => c + e)(a))
// to
// (a = b, a + e)
type Options = {
call: t.CallExpression | t.AwaitExpression;
path: NodePath<t.BinaryExpression & { operator: "|>" }>;
placeholder: t.Identifier... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-proposal-pipeline-operator/src/index.ts | packages/babel-plugin-proposal-pipeline-operator/src/index.ts | import { declare } from "@babel/helper-plugin-utils";
import syntaxPipelineOperator from "@babel/plugin-syntax-pipeline-operator";
import minimalVisitor from "./minimalVisitor.ts";
import hackVisitor from "./hackVisitor.ts";
import fsharpVisitor from "./fsharpVisitor.ts";
import smartVisitor from "./smartVisitor.ts";
i... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-react-inline-elements/src/index.ts | packages/babel-plugin-transform-react-inline-elements/src/index.ts | import { declare } from "@babel/helper-plugin-utils";
import helper from "@babel/helper-builder-react-jsx";
import { types as t } from "@babel/core";
export default declare(api => {
api.assertVersion(REQUIRED_VERSION(7));
function hasRefOrSpread(attrs: t.JSXOpeningElement["attributes"]) {
for (let i = 0; i < ... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/src/namespace.ts | packages/babel-plugin-transform-typescript/src/namespace.ts | import { template, types as t, type NodePath } from "@babel/core";
import { registerGlobalType } from "./global-types.ts";
import { EXPORTED_CONST_ENUMS_IN_NAMESPACE } from "./const-enum.ts";
export function getFirstIdentifier(node: t.TSEntityName): t.Identifier {
if (t.isIdentifier(node)) {
return node;
}
... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/src/enum.ts | packages/babel-plugin-transform-typescript/src/enum.ts | import { template, types as t, type NodePath } from "@babel/core";
import assert from "node:assert";
import annotateAsPure from "@babel/helper-annotate-as-pure";
import { skipTransparentExprWrapperNodes } from "@babel/helper-skip-transparent-expression-wrappers";
type t = typeof t;
const ENUMS = new WeakMap<t.Identif... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/src/global-types.ts | packages/babel-plugin-transform-typescript/src/global-types.ts | import type { NodePath, Scope } from "@babel/core";
export const GLOBAL_TYPES = new WeakMap<Scope, Set<string>>();
export function isGlobalType({ scope }: NodePath, name: string) {
if (scope.hasBinding(name)) return false;
if (GLOBAL_TYPES.get(scope).has(name)) return true;
console.warn(
`The exported iden... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/src/index.ts | packages/babel-plugin-transform-typescript/src/index.ts | import { declare } from "@babel/helper-plugin-utils";
import syntaxTypeScript from "@babel/plugin-syntax-typescript";
import type { PluginPass, types as t, Scope, NodePath } from "@babel/core";
import { injectInitialization } from "@babel/helper-create-class-features-plugin";
import type { Options as SyntaxOptions } fr... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/src/const-enum.ts | packages/babel-plugin-transform-typescript/src/const-enum.ts | import type { NodePath, types as t } from "@babel/core";
import { translateEnumValues } from "./enum.ts";
export const EXPORTED_CONST_ENUMS_IN_NAMESPACE =
new WeakSet<t.TSEnumDeclaration>();
export type NodePathConstEnum = NodePath<t.TSEnumDeclaration & { const: true }>;
export default function transpileConstEnum(... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/regression/15768/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/regression/15768/input.ts | const v = 42;
const v2 = Infinity;
const v3 = NaN;
{
let Infinity = 1;
let NaN = 2;
enum StateEnum {
okay = 0,
neg = -Infinity,
pos = Infinity,
nan = NaN,
negReal = -1 / 0,
posReal = 1 / 0,
nanReal = 0 / 0,
ext = v,
ext2 = v2,
ext3 = v3,
}
}
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/regression/10162/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/regression/10162/input.ts | export default 2; | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/regression/10338/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/regression/10338/input.ts | const {result} = idArray.reduce(
(a, b) => {},
{result: [] as (number | bigint)[]},
) | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/variable-declaration/types-erased/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/variable-declaration/types-erased/input.ts | const n: number = 0;
const [a, b]: any = 0;
const { x, y }: any = 0;
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/variable-declaration/exclamation/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/variable-declaration/exclamation/input.ts | let x!: number;
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/variable-declaration/non-null-in-optional-chain/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/variable-declaration/non-null-in-optional-chain/input.ts | const a = 1;
const b = () => a?.b?.c!.d;
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/cast/multiple-assert-and-assign/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/cast/multiple-assert-and-assign/input.ts | (a as number as any) = 42; | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/cast/non-null-assertion/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/cast/non-null-assertion/input.ts | x!;
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/cast/as-expression/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/cast/as-expression/input.ts | x as T;
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/cast/type-assertion/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/cast/type-assertion/input.ts | <T> x;
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/exports/export-context-variables/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/exports/export-context-variables/input.ts | export default undefined;
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/exports/export-type/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/exports/export-type/input.ts | type A = 2;
export type { A };
;
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/exports/export=/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/exports/export=/input.ts | export = 0; | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/exports/issue-9916-3/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/exports/issue-9916-3/input.ts | /**
* @module
*/
/**
* @typedef {Function} PromiseResolveCb
*/
export type PromiseResolveCb<T> = (value?: T | PromiseLike<T>) => void;
/**
* @typedef {Function} PromiseRejectCb
*/
export type PromiseRejectCb = (reason?: any) => void;
var a; | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/exports/issue-9916-2/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/exports/issue-9916-2/input.ts | /**
* @module
*/
import '../message-bus';
/**
* @typedef {Function} PromiseResolveCb
*/
export type PromiseResolveCb<T> = (value?: T | PromiseLike<T>) => void;
/**
* @typedef {Function} PromiseRejectCb
*/
export type PromiseRejectCb = (reason?: any) => void;
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/exports/export-type-star-from/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/exports/export-type-star-from/input.ts | export type * from './mod';
export type * as ns from './mod';
// Note: TSC doesn't support string module specifiers yet,
// but it's easier for us to support them than not.
export type * as "ns2" from './mod';
;
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/exports/export-const-enums/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/exports/export-const-enums/input.ts | const enum None {};
export type { None };
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/exports/interface/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/exports/interface/input.ts | ; // Otherwise-empty file
export interface I {}
export default interface A {}
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/exports/type-only-export-specifier-2/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/exports/type-only-export-specifier-2/input.ts | export { type A1, type A2 } from "a"
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/exports/declared-types/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/exports/declared-types/input.ts | declare const x: number;
declare function f(): void;
declare class C {}
declare enum E {}
declare module "m" {}
declare module M {}
declare namespace N {}
export interface I {}
export type T = number;
export class C2 {}
export { x, f, E, C }; // Not-even E
export { M, N, I as I1, T as T1 }; // everything removed
expor... | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/exports/export=-to-cjs/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/exports/export=-to-cjs/input.ts | export = 0; | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/exports/imported-types-only-remove-type-imports/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/exports/imported-types-only-remove-type-imports/input.ts | import type A from "A";
import type { B } from "B";
import C from "C";
export { A, B, C } // <-- A and B will be removed
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/exports/type-only-export-specifier-1/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/exports/type-only-export-specifier-1/input.ts | class Foo {}
export { type Foo };
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/exports/export-import=/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/exports/export-import=/input.ts | import * as joint from '@joint/core';
export import JGraph = joint.dia.Graph;
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/exports/issue-9916-1/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/exports/issue-9916-1/input.ts | /**
* @module
*/
import '../message-bus';
/**
* @typedef {Function} PromiseResolveCb
*/
export type PromiseResolveCb<T> = (value?: T | PromiseLike<T>) => void;
/**
* @typedef {Function} PromiseRejectCb
*/
export type PromiseRejectCb = (reason?: any) => void;
var a; | typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/exports/declare-shadowed/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/exports/declare-shadowed/input.ts | declare class Signal<T = any> {
value: T
}
function Signal(this: Signal, value?: unknown) {
this.value = value
}
export { Signal };
function Signal2(this: Signal2, value?: unknown) {
this.value = value
}
declare class Signal2<T = any> {
value: T
}
export { Signal2 };
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
babel/babel | https://github.com/babel/babel/blob/30af57a25649635268e0a9ecdfae99bdd5dda5b4/packages/babel-plugin-transform-typescript/test/fixtures/exports/export-globals/input.ts | packages/babel-plugin-transform-typescript/test/fixtures/exports/export-globals/input.ts | export default Math;
| typescript | MIT | 30af57a25649635268e0a9ecdfae99bdd5dda5b4 | 2026-01-04T15:46:08.418221Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.