Registry / type-stubs / faster-babel-types

faster-babel-types

JSON →
library0.1.0jsnpmunverified

faster-babel-types provides a drop-in replacement for @babel/types with optimized runtime performance and TypeScript support. Currently at version 0.1.0, this package is in early active development and is designed for projects that use @babel/types and want faster type checking or creation functions. It maintains the same API surface but aims to improve speed, especially in code paths that extensively use Babel AST types. The main differentiator is performance optimization for Babel plugin authors or tools that process large ASTs. However, it is experimental and not yet stable for production use.

type-stubs
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ESM-only; default export provides all types

import t from 'faster-babel-types'

Same named export as @babel/types

import { stringLiteral } from 'faster-babel-types'

ESM-only; also available as t.isStringLiteral

import { isStringLiteral } from 'faster-babel-types'

Shows default import (t) and named imports for creating and checking AST nodes.

import t, { stringLiteral, isStringLiteral } from 'faster-babel-types'; const lit = stringLiteral('hello'); console.log(lit.type); // 'StringLiteral' console.log(isStringLiteral(lit)); // true console.log(t.isStringLiteral(lit)); // true
Debug
Known footguns
breakingfaster-babel-types is not API compatible with @babel/types for all functions; some optimizations may change behavior in edge cases.
gotchaNever mix imports from @babel/types and faster-babel-types; use exclusively one to avoid type mismatches or performance regressions.
gotchaTypeScript types bundled are preliminary and may diverge from @babel/types types; type errors can occur.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
12 hits · last 30 days
gptbot
4
ahrefsbot
4
script
1
bytedance
1
Resources