emoji-regex
emoji-regex copied to clipboard
typescript synthetic import
when using emoji-regex with es style imports such as
import emojiRegex from 'emoji-regex/es2015/RGI_Emoji';
typescript gives the following error:
This module is declared with using 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag.
looking at the typescript documentation for default exports it looks like
export = emojiRegex;
should be replaced by
export default emojiRegex;
inside each .d.ts file
I tried making this change manually inside my node_modules folder and it seems to resolve the issue
note: this is a regression because it used to work in v9.2.0 but it doesn't work in v9.2.2
Does anyone wanna submit a patch?
@mathiasbynens if you don't like #99 I can make a PR that only include the typescript fix.