-
Notifications
You must be signed in to change notification settings - Fork 398
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
AsyncHook in types #159
Comments
|
I believe that's not true. import { AsyncHook } from "tapable";
const someHook = new AsyncHook(); Typescript throws no error, but at runtime module |
There is not |
Oh you are right. There seams to be some "feature" of typescript which automatically exports declared stuff. The only "workaroud" I've found is to declare the "private" types in separate file and then import them in I think that this should be done in this case because importing not existing class and not getting error from typescript, and getting an |
Why you need |
No I don't need it, I meant that the fact that I'm able to import it (at least it types) from |
AsyncHook
is declared in types but not exported by lib, this leads to types errors when trying to instantiate new AsyncHook.I would propose remove
AsyncHook
fromtapable.d.ts
because it's misleading.Thanks!
The text was updated successfully, but these errors were encountered: