radashi-org / radashi

The modern, community-first TypeScript toolkit with all of the fast, readable, and minimal utility functions you need. Type-safe, dependency-free, tree-shakeable, fully tested.
https://radashi.js.org
MIT License
314 stars 25 forks source link

Traverse type not exported? #243

Closed selfagency closed 2 months ago

selfagency commented 2 months ago

If you try to import {traverse} it throws:

The requested module 'radashi' does not provide an export named 'traverse'".

If you try import * as _ and then use _.traverse, the function is there but TypeScript throws again:

Property 'traverse' does not exist on type 'typeof import("/Users/daniel/Developer/highholidays/node_modules/.pnpm/radashi@12.1.0/node_modules/radashi/dist/index")'.ts(2339)

Guessing you just forgot to include the type in the exported type definitions.

aleclarson commented 2 months ago

Hey, traverse is an upcoming feature, only available in radashi@beta at the moment. Sorry for the confusion in the docs. I hope to add “Available since v12.2.0” to each function's documentation page at some point.