-
Notifications
You must be signed in to change notification settings - Fork 5
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
Cannot import
module in v1.1.0 (like one could with 1.0.1)
#3
Comments
does |
No it does not work in TS. I get the following error: |
I think it's related to this: microsoft/TypeScript-React-Starter#8 |
Fair enough. It looks like an incompatibility between es6 modules and typescript. FWIW I added this a while back: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/deep-freeze-es6/index.d.ts Perhaps your type definition file can be reworked? |
Sorry for the delay of response... I'm not sure I want to support https://www.typescriptlang.org/docs/handbook/modules.html
So it doesn't really make sense to have a function if you do a |
If I look at how I'm importing other TS libs (those either written in TS or with @types declarations) they all follow the pattern Also, tuning up the One lib to consider following is declare function deepFreeze<T>(obj: T): T;
export default deepFreeze; Then one would import it with |
I can only use |
Before today's upgrade, I could use the es6-style imports in TypeScript:
import * as deepFreeze from "deep-freeze-es6";
Now I get this error:
I can fix it by switching to require, but that feels so old-fashioned now:
import deepFreeze = require("deep-freeze-es6");
The text was updated successfully, but these errors were encountered: