Earlier quoted context omitted.
I'd suggest using the --outDir option, so TS writes the .js files to a different directory which you can easily blow away.
Hey Rob any idea why VSCode gives this warning on export class for Components? >[ts] Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning. When using the angular-cli,
I Was Wrong About TypeScript
71–80 of 194 posts
Re: I Was Wrong About TypeScript
#72With the arrival of TS 2.0 this month (hopefully) we'll have some cool features: a union types [1] b type guards to work with them [1] c nonullable types [2] [1] https://www.typescriptlang.org/docs/handbook/advanced-types.... [2] https://github.com/Microsoft/TypeScript/pull/7140 As a Scala developer I like Typescript a lot. Which is a first for me in browser development. But I'm not so fond of webpack et al. So I cre…
- moving types to npm (despite the great work of Blake on typings, managing type definitions is still out of band) - npm install @types/somelib will be great.
- AST transforms, which will open up some interesting options for bundling and optimizations, sort of like babel's plugin ecosystem.
Re: I Was Wrong About TypeScript
#73Another good alternative is Facebook's flow. Rather than being a transpired language it works on top of JavaScript files. This two tools are amazing and it improves working with JavaScript to the point of never wanting to go back to not typed JavaScript
Well, you still need some transpiling in order to remove the Flow type signatures. In practice, they end up being pretty similar in terms of needing a build step.
Your existing minification step will remove the comments. But even if you don't remove the comments the code will still run.
Re: I Was Wrong About TypeScript
#74I just can't justify writing my team's code base in typescript. I don't want to make that move, setting us down a very specific path. I don't want to add another layer of training to develop on our codebase, but mainly, I just don't have the confidence that it's a right or wrong choice, and its a big choice. But I get a sense that it would be great to try for smaller, disposable projects as that's limited risk. Does…
One of the huge benefits is that you can start using "future" features (like sane variable scoping, for example) of JS now - TS will treat the code as "new", but downcompile it to what current browsers can understand.
Re: I Was Wrong About TypeScript
#75We use ts-node to run our mocha tests without ever compiling: https://github.com/TypeStrong/ts-node
Re: I Was Wrong About TypeScript
#76The thing with 3rd party libs is, often there are no type defs, especially bleeding edge stuff :/ Also VSC often is flunky with picking up defs... sometimes you open a file and some are missing. Or imports with numbers don't work. On the other hand, using big libs like babylonjs is charming with all the auto complete :)
It's not a problem. You can resort to any type and works with 3rd party stuff like with normal JS code.
Re: I Was Wrong About TypeScript
#77Re: I Was Wrong About TypeScript
#78Earlier quoted context omitted.
I can't go with that. Anders H is one of the most avuncular, helpful and accessible voices out there. Oh and his very verbs twinkle!
Well, I just saw a talk about TypeScript 2 and it felt to me that he was belittling JavaScript.
Re: I Was Wrong About TypeScript
#79Re: I Was Wrong About TypeScript
#80Earlier quoted context omitted.
> I found all the other tools to carry far more cognitive load What tools are you talking about?
System.js, Rx.js, decorators, ng2's DI - there's a lot of new concepts thrown in for the unfamiliar