npm / ast-types
ast-types
What changed in ast-types 0.16, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
9 new APIs and options1 behavior and defaults13 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initast-types 0.1623 changes
New APIs and options 9
Registers decorators so visitors traverse and deep checks accept class declarations with decorators.
Registers options so visitors traverse and deep checks accept import attributes in import() types.
Allows kind to be "using" and "await using" for explicit resource management declarations.
CallExpression now carries TypeScript type arguments, and the visitor traverses them.
ExportAllDeclaration gains an exportKind field with value or type variants, supporting TypeScript type-only star exports.
ExportNamedDeclaration gains an exportKind field with value or type variants, supporting TypeScript type-only star exports.
specifiers now accepts ExportNamespaceSpecifier, ExportDefaultSpecifier and ExportBatchSpecifier; code reading local on every specifier needs an ExportSpecifier check.
NewExpression now carries TypeScript type arguments, and the visitor traverses them.
OptionalCallExpression now carries TypeScript type arguments, and the visitor traverses them.
Behavior and default changes 1
declaration now defaults to null, allowing Babel ASTs that omit the property for specifier-only exports to validate.
Fixes and other changes 13
Registers the optional field on array patterns so visitors traverse and deep checks accept these nodes.
Registers typeAnnotation on array patterns so visitors traverse and deep checks accept the shared Flow and TypeScript definition.
Registers the optional field on assignment patterns so visitors traverse and deep checks accept these nodes.
Registers typeAnnotation on assignment patterns so visitors traverse and deep checks accept the shared Flow and TypeScript definition.
Registers decorators so visitors traverse and deep checks accept class expressions with decorators.
Registers typeParameters so visitors traverse and deep checks accept explicit JSX type arguments.
Registers the optional field on object patterns so visitors traverse and deep checks accept these nodes.
Registers typeParameters so visitors traverse and deep checks accept TypeScript instantiation expressions such as f<T>.
Registers typeParameters so visitors traverse and deep checks accept TypeScript instantiation expressions such as typeof f<T>.
exported may be a string Literal; code reading exported.name needs to check for Identifier first.
The package is now published on the latest dist-tag, so npm install ast-types resolves to this release instead of the older build.
NodePath imported from the package is now usable as a generic type, and declaration imports no longer conflict with declared values under isolatedModules.
Type imported from the package is now usable as a generic type, and declaration imports no longer conflict with declared values under isolatedModules.