-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add TypeScript definition #81
Add TypeScript definition #81
Conversation
index.d.ts
Outdated
* | ||
* @example | ||
* | ||
* const del = require('del'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use import
syntax. This is supposed to be a TS usage example.
* const del = require('del'); | |
* import del from 'del'; |
@@ -0,0 +1,22 @@ | |||
import {expectType} from 'tsd-check'; | |||
import del, {sync as delSync} from '.'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I the only one that finds this ugly? Should the sync
just be a property of the default export instead of a named export? Or should we name the named export delSync
so it doesn't have to be renamed to that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a fan of default imports. They're always kinda ugly, everyone names the thing differently and the tooling has hard times determining what you actually want to import. It's much easier with named exports.
No description provided.