-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Refactor TypeScript definition to use CJS compatible export #32
Refactor TypeScript definition to use CJS compatible export #32
Conversation
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 tried all of these combinations and all seem to be working correctly (approved by TS or showing autocomplete in VSCode.
// TS file
import mem from 'mem';
import mem = require('mem');
// JS file
import mem from 'mem';
const mem = require('mem')
So I approve this style, except the two comments below:
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.
Your reasoning makes sense, and also the intent to drop the default
export in future releases to avoid breaking existing setups without esModuleInterop
👍
|
✅ |
Can you add a TODO comment to https://github.com/sindresorhus/mem/blob/master/index.js#L79 too? |
Fixes #31.
Waiting for tsdjs/tsd#20.