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
Fix error TS2497 on import * as X from 'statsd-client'
:
#10291
Fix error TS2497 on import * as X from 'statsd-client'
:
#10291
Conversation
statsd-client/statsd-client.d.ts to author (@peterkooijmans). Could you review this PR? Checklist
|
Double-checked with the project in which I tripped over the problem:
|
I think it's safe to claim:
UPDATE: aah, I see the note in the contribution guide, now. Closed and re-opened to kick Travis off… UPDATE: fine. I'll make some change to the commit message and |
d077714
to
4810f1b
Compare
@garthk Thank you for your contribution. And please remove the |
UPDATE: |
4810f1b
to
b0b5964
Compare
Rebased on current |
Per microsoft/TypeScript#5073, closed as `By Design` by @mhegazy, we need to export a namespace for `import *` to work, else `TS2497`. That clashes with the `export = ClassName` pattern unless you also merge in a namespace, e.g. with `namespace ClassName {}`.
b0b5964
to
f7763de
Compare
@garthk Thanks! |
Per microsoft/TypeScript#5073, closed as
By Design
by @mhegazy, we need to merge a namespace with the export when usingexport =
, otherwiseimport *
must fail.Pinging @peterkooijmans and @horiuchi for review.