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.

npm install faster-babel-types
INSTALL
IMPORT
SIG · FASTER-BABEL-TYPES
F
faster-babel-types
type-stubsjavascriptv0.1.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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.

t
import t from 'faster-babel-types'
const t = require('faster-babel-types')
ESM-only; default export provides all types
stringLiteral
import { stringLiteral } from 'faster-babel-types'
import { stringLiteral } from '@babel/types'
Same named export as @babel/types
isStringLiteral
import { isStringLiteral } from 'faster-babel-types'
const { isStringLiteral } = require('faster-babel-types')
ESM-only; also available as t.isStringLiteral

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 issues
breakingfaster-babel-types is not API compatible with @babel/types for all functions; some optimizations may change behavior in edge cases.
fix
Test thoroughly with your Babel plugin or tooling; consider pinning version to avoid unexpected changes.
affects: >=0.0.0
gotchaNever mix imports from @babel/types and faster-babel-types; use exclusively one to avoid type mismatches or performance regressions.
fix
Replace all imports of @babel/types with faster-babel-types.
affects: >=0.0.0
gotchaTypeScript types bundled are preliminary and may diverge from @babel/types types; type errors can occur.
fix
Install @babel/types as a dev dependency and use its types if needed; report type issues upstream.
affects: >=0.1.0 <0.2.0
Errors
Common errors & fixes
Cannot find module 'faster-babel-types'
Package not installed or not in node_modules.
fix
npm install faster-babel-types @babel/types
TypeError: t.stringLiteral is not a function
Used default import t but function is missing; named export casing may differ.
fix
Use named import: import { stringLiteral } from 'faster-babel-types'.
Module not found: Error: Can't resolve 'faster-babel-types'
Webpack or bundler may not resolve peer dependency correctly; missing @babel/types.
fix
Ensure @babel/types is installed as a direct dependency: npm install @babel/types
Upgrade
Version history
0.1.0latest on npm
Audit
Dependencies
@babel/typesrequiredpeer dependency; faster-babel-types re-exports and wraps @babel/types functions
Agent activity
38 hits · last 30 days
node
34
OpenAI (training)
2
Resources
faster-babel-types — npm install faster-babel-types · libregistry