Closed realityking closed 3 years ago
Great. Sometimes it's painful to test something directly in files, I have to name the default function 🤣
Rebased to fix a merge conflict.
This change also makes the .d.ts
files a lot more readable.
For example, table.d.ts
currently looks like this:
import type { TableUserConfig } from './types/api';
declare const _default: (data: unknown[][], userConfig?: TableUserConfig) => string;
export default _default;
with this change it'll look like this:
import type { TableUserConfig } from './types/api';
export default function table(data: unknown[][], userConfig?: TableUserConfig): string;
Totals | |
---|---|
Change from base Build 325: | 0.0% |
Covered Lines: | 345 |
Relevant Lines: | 345 |
What do you think about getting rid of default exports and use export const funcitonName = () => {}
?
Would work for me as well, would just require changing the imports everywhere as well. Would you prefer that?
@gajus Rebased it. Would be great if you could review this soon. Fixing the merge conflicts is quite a pain as it touches a lot of code.
Yikes. Sorry, I saw this PR only after merging the other PRs.
@nam-hle Please wait on this PR to be merged before making further changes.
Yikes. Sorry, I saw this PR only after merging the other PRs.
@nam-hle Please wait on this PR to be merged before making further changes.
Of course. I also forgot to remind you to merge @realityking's PR. Sorry guys 😅
Urgh. Here's another shot.
Thank you @realityking @nam-hle !
:tada: This PR is included in version 6.6.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
This is a small regression from #147 where the babel plugin that adds function names to the default exports was removed. Instead of reintroducing babel just for that plug-in, I'd propose to just add the function names manually. This is mainly nice for stack traces to be more useful.
cc @nam-hle