-
Notifications
You must be signed in to change notification settings - Fork 21
Conversation
Ready to be merged. You can see sourcemaps work in chrome over here : https://github.com/basarat/sourceMapTest |
Really awesome! |
"compilerOptions": { | ||
"target": "es5", | ||
"module": "commonjs", | ||
"declaration": false, |
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.
Make "declaration": true
and update index.d.ts.
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.
done
@@ -77,22 +81,56 @@ var tss; | |||
return path.dirname(require.resolve('typescript')); | |||
}; | |||
TypeScriptSimple.prototype.getDefaultLibFilename = function (options) { | |||
if (options.target === 2 /* ES6 */) { | |||
if (options.target === ts.ScriptTarget.ES6) { |
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.
@basarat I think this is better, but my tsc (TypeScript 1.4.2 on Mac) compiles ts.ScriptTarget.ES6
to 2
without asking.
What your compiler option keeps enum expressions?
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.
What your compiler option keeps enum expressions?
Its a bug in the language service. Constant enums should always be inlined.
I use atom-typescript and that build using the language service (instead of the cli). : https://atom.io/packages/atom-typescript
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.
I got it. thanks.
LGTM! thanks! |
closes #6
👍 on your code quality. Really simple. Zero dependencies. Really easy to reuse. Comes with tests ❤️
Added a
tsconfig.json
to make it easier to work on this with any editor.Will be bringing in stuff from https://github.com/thlorenz/convert-source-map
Will leave a comment once this code is ready for merge