babel-type-scopes

JSON →
library 1.1.0 ·javascript
verified May 27, 2026

Utility functions for looking up and working with Flow and TypeScript type scopes in Babel. Version 1.1.0 provides four main functions: isTypeScope, getClosestTypeScopePath, getOwnTypeBindings, and getTypeBinding. These helpers identify whether a Babel path creates a type scope, find the nearest ancestor type scope, retrieve type bindings defined in the current scope, and search for type bindings up the scope chain. The package supports both Flow and TypeScript, and is intended for Babel plugin or tool authors. It is lightweight with no production dependencies. Released in 2018, the library is stable but sees infrequent updates. Similar functionality exists in @babel/traverse, but this package provides more targeted scope inspection.

total hits 25
actors 8 distinct systems
last hit 19h ago AhrefsBot
Amazonbot
4
MetaBot
4
ByteDance
3
GPTBot
2
Script
1
Search engines
1
Humans
2

top countries 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇨🇦 Canada · PT