Skip to content
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

TypeScript d.ts errors with corejs@0.9.18 #177

Closed
Assignees
Labels

Comments

@davismj
Copy link
Member

davismj commented Aug 4, 2015

For all generated d.ts files in Aurelia explicitly using core-js, core js is imported as

import core from 'core-js'

This throws the following TypeScript compiler error, for example

jspm_packages/github/aurelia/templating@0.13.15/aurelia-templating.d.ts(2,10): error TS1192: External module '"core-js"' has no default export.

Changing the first line to the following resolves the error. This change is consistent with the d.ts fetched from tsd for corejs@0.9.18

import * as core from 'core-js';

@EisenbergEffect
Copy link
Contributor

I'm wondering if we could actually just do import from 'core-js' since it's all just polyfills?

@davismj
Copy link
Member Author

davismj commented Aug 4, 2015

Yea, import 'core-js' also works, which is what you meant, I think.

@EisenbergEffect
Copy link
Contributor

Yes. I bet we could switch all the libraries over to that.

@davismj
Copy link
Member Author

davismj commented Aug 4, 2015

I can take a look at it tomorrow morning.
On Aug 4, 2015 11:00 AM, "Rob Eisenberg" notifications@github.com wrote:

Yes. I bet we could switch all the libraries over to that.


Reply to this email directly or view it on GitHub
#177 (comment).

@davismj
Copy link
Member Author

davismj commented Aug 4, 2015

It seems that import 'core-js' generates invalid output in the babel-dts-generator.

YoloDev/babel-dts-generator#22

@davismj
Copy link
Member Author

davismj commented Aug 12, 2015

Any chance we can pull these in for now? I can revisit this if we want to move to import 'core-js' down the line.

jspm_packages/github/aurelia/binding@0.8.5/aurelia-binding.d.ts(2,10): error TS1192: Module '"core-js"' has no default export.
jspm_packages/github/aurelia/dependency-injection@0.9.1/aurelia-dependency-injection.d.ts(2,10): error TS1192: Module '"core-js"' has no default export.
jspm_packages/github/aurelia/framework@0.14.1/aurelia-framework.d.ts(2,10): error TS1192: Module '"core-js"' has no default export.
jspm_packages/github/aurelia/history-browser@0.6.2/aurelia-history-browser.d.ts(2,10): error TS1192: Module '"core-js"' has no default export.
jspm_packages/github/aurelia/http-client@0.10.2/aurelia-http-client.d.ts(2,10): error TS1192: Module '"core-js"' has no default export.
jspm_packages/github/aurelia/loader@0.8.3/aurelia-loader.d.ts(2,10): error TS1192: Module '"core-js"' has no default export.
jspm_packages/github/aurelia/metadata@0.7.2/aurelia-metadata.d.ts(2,10): error TS1192: Module '"core-js"' has no default export.
jspm_packages/github/aurelia/route-recognizer@0.6.1/aurelia-route-recognizer.d.ts(2,10): error TS1192: Module '"core-js"' has no default export.
jspm_packages/github/aurelia/router@0.10.4/aurelia-router.d.ts(2,10): error TS1192: Module '"core-js"' has no default export.
jspm_packages/github/aurelia/templating@0.13.16/aurelia-templating.d.ts(2,10): error TS1192: Module '"core-js"' has no default export.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment