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

Make compatible with TypeScript compiler (by adding ".js" postfix if it was missing) #1999

Closed
wants to merge 2 commits into from

Conversation

iislucas
Copy link
Member

If a module fails to load, and the module name does not end in ".js", and adding ".js" postfix will make the file load, then do that. This makes traceur compatible with TypeScript, which current emits import statements that don't include the ".js" postfix.

See:
#1997
and
microsoft/TypeScript#5460

Added test, and testes with make test

Review on Reviewable

@arv
Copy link
Collaborator

arv commented Oct 30, 2015

I think this needs to be guarded by an option. We don't want to go back to allowing this by default.


Reviewed 2 of 2 files at r1.
Review status: 1 of 2 files reviewed at latest revision, 2 unresolved discussions.


src/runtime/TraceurLoader.js, line 155 [r1] (raw file):
Missing {}


test/unit/runtime/Loader.js, line 150 [r1] (raw file):
You can use ES6 here so a template literal would have been cleaner.


Comments from the review on Reviewable.io

@iislucas
Copy link
Member Author

iislucas commented Jan 4, 2016

Just closing the loop on this. I ended up finding another way to do this, so I don't mind leaving this as is. If someone else needs traceur, then can easily finish this up. :)

@iislucas iislucas closed this Jan 4, 2016
@arv
Copy link
Collaborator

arv commented Jan 7, 2016

OOC did TypeScript finally change this?

@iislucas
Copy link
Member Author

iislucas commented Jan 7, 2016

I don't think so; I just found an easier way using the closure compiler, which solves another problem I was having also (actually doing the module loading).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants