Closed broofa closed 6 months ago
It's generally best to focus on the issue at hand and not cramp in lots of unrelated changes. I'm using XO and AVA in all my projects and I don't plan to remove them here. I also prefer keeping the default export to not break backwards compatibility, but also because I think it's a better API.
@sindresorhus : Reverted all changes not essential to #27 . If you could take another look, that'd be great. If you're still not interested, go ahead and close I suppose. Cheers!
You can use this trick to avoid having to specify the named exports manually for the default export: https://github.com/sindresorhus/query-string/blob/main/index.js
You can use this trick to avoid having to specify the named exports manually for the default export: sindresorhus/query-string@main/index.js
Also for index.d.ts
@sindresorhus Updated the .d.ts file to use the same index/base pattern. Note that this uses the "`export as default from '...'" pattern for the default export in
index.d.ts. This was the only pattern that seemed to keep both TypeScript (in VSCode) from complaining, and also satisfy
tsd` in the unit test.
Thanks :)
[Deleted previous description.]
Adds support for named exports. This is achieved by declaring all functions and constants as named exports, first, and then using them to compose the default object API.
All that other guff about
ava
andxo
, etc... has been reverted. 😄Fixes #27