why packages in Chance ts-2.0 are exposing js rather than ts files
Author: 3aluwCreated Sep 4, 2023Updated Jan 19, 2024
Following the README in ts-2.0 branch. all the internal modules couldn't be found.
for example Prime package need picker package but couldn't find it.
in the pick/package.json we find that main is a js file(doesn't contain any type declarations)
simply by changing main to :"./src/index.ts"
Prime now can import picker package :
small note : module field (look at the 1st picture) is not (& won't be) supported in node. look here
Source: chancejs/chancejs