Closed drawmindmap closed 2 years ago
Hi @drawmindmap ,
Thanks for the contribution. What's the use case to export types? Should constants be exported as well?
I need these types when set jsonParser.onValue
jsonParser.onValue = (value: JsonPrimitive) => {}
But it'ok when I just ignore the type:
jsonParser.onValue = value => {}
And it would be better if other types or interfaces used in exported classes are exported too, like:
JSONParserOpts
Just wanted to report that i had the same problem with the export definitions package.json and had to manually overwrite the files in order to get it to work.
This was the error i got before making the change:
Failed to resolve entry for package "@streamparser/json". The package may have incorrect main/module/exports specified in its package.json. 8:44:12 AM [vite] Internal server error: Failed to resolve entry for package "@streamparser/json". The package may have incorrect main/module/exports specified in its package.json.
Thanks @drawmindmap for the PR which solves the problem.