This repository was archived by the owner on Feb 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3e2becb
to
d9852b4
Compare
@alexeagle PTAL, I think this is good. |
errors: string[] = []; | ||
|
||
constructor(private failFast: boolean = false, private generateLibraryName: boolean = false) {} | ||
constructor(opts: TranspilerOptions = {}) { | ||
this.failFast = !!opts.failFast; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we store individual fields in the class, rather than a single TranspilerOptions reference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No strong reason - I thought it was clearer to pull out the fields and coerce them into booleans here. I can change if you feel strongly about it.
nice, LGTM |
Also refactor the interface to ts2dart to pass an options object, for better readability of the call sites. Extract an Output class that handles result appending and source map generation.
I've sent evanw/node-source-map-support#48 for the source map issue. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This doesn't quite work yet - for some reason Chrome doesn't pick up the source map.