Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
DCoder
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
241.
▲
by
DCoder
11y ago
A better way would be to do like Arnavion said, for really global libraries you should create a .d.ts file and put this line in it: declare var somelib: any; Done. Now the compiler and everything else will know that there's a
242.
▲
by
DCoder
11y ago
It would not be an error if not for `addToList(cats, new Dog())`. Based on that call, Flow infers that `cats` has to be a `Dog[]`, not `Cat[]`.
243.
▲
by
DCoder
11y ago
The old plan was to enable it in Fx 44 (the one that was just released). But a couple of bugs caused a delay and it was pushed back. It was just enabled in nightly/dev builds [0], so Fx 46 will probably have it. [0]: https://
244.
▲
by
DCoder
11y ago
That's all true. It's a chicken-and-egg problem there, though. I've seen several arguments that the language is not worth looking into until more typings become available, and of course those naysayers are not going to write
245.
▲
by
DCoder
11y ago
TypeScript is very nice. The one main problem it has is lack of type definitions for third-party modules, some developers find having to "waste time" writing those defs themselves to be quite bothersome.
246.
▲
by
DCoder
11y ago
https://kangax.github.io/compat-table/es6/#node5
247.
▲
by
DCoder
11y ago
You might find Robert Wachter's The Digital Doctor interesting, although it focuses on the big picture more than specific examples: http://www.amazon.com/dp/B00TT5I9A0/
248.
▲
by
DCoder
11y ago
Random data point: last time I checked, the AWS management console web interface was built in Angular.
249.
▲
by
DCoder
11y ago
One thing worth noting: MooTools, Prototype.js and some other libraries were fond of extending built-in object prototypes. jQuery wasn't. ES7 wanted to introduce an Array#contains method. But due to prototype extension issues like htt
250.
▲
by
DCoder
11y ago
> Promises Careful with that axe... Before jQuery 3.0, its promises API is not compatible with the Promises/A+ spec: http://stackoverflow.com/q/23744612/1233508 If you're used to jQuery's promi
251.
▲
by
DCoder
11y ago
And Red Alert 2: YR fans might find Ares [1] interesting: it's an engine-enhancement that fixes a ton of funky bugs [2] and enables loads of new functionality, and popular mods like Mental Omega and D-Day take advantage of that functio
252.
▲
by
DCoder
11y ago
> Who, with a lot of money, would want to hurt Linode's business in this way? This isn't just a "script kiddie" having fun. It's a very well planned and powerful attack requiring buying large botnet capacity for
253.
▲
by
DCoder
11y ago
With that approach, the module loader needs to know which version of a module to load for you when you require() something - in the general case that can't be done without parsing your package.json . This would require changes to node
254.
▲
by
DCoder
11y ago
> Watch any React tutorial and the first thing they have you do is set up a Webpack config that gives you a live-reloading build system with ES2015. To be honest, I prefer learning by reading specs/documentation, tinkering and Goo
255.
▲
by
DCoder
11y ago
> It's relative to the location of the executable, not the current working directory. It actually searches both the location of the executable and the CWD: https://support.microsoft.com/en-us/kb/2389418#m
256.
▲
by
DCoder
11y ago
Nitpick - Grunt is a task runner, Gulp and Brunch are build tools, Webpack is just a module bundler, it's not a full build tool - it's more a replacement for r.js than for Gulp (and it's remarkably faster than r.js). After tr
257.
▲
by
DCoder
11y ago
React can do strongly-typed views. I use Typescript, and I can build the DOM either in JSX or by nesting React.DOM.div() and friends, and the Typescript compiler will yell at me if I use an event handler/variable/etc. that does no
258.
▲
by
DCoder
11y ago
In a fairly simple project, I have these: gulp-autoprefixer -- CSS vendor prefixes gulp-concat -- concatenates multiple files into one gulp-cssmin -- CSS minifier gulp-imagemin -- image optimizer/minifier gulp-ren
259.
▲
by
DCoder
11y ago
That's a valid approach, but "Good old Make" is only good if you are already familiar with it (and its quirks). If you're a new-ish web developer, "learning Make" and "learning Gulp" are two equally f
260.
▲
by
DCoder
11y ago
You can write a replacement for gulp in Perl 6, but if it doesn't have the plugins, who will use it? Grunt and gulp have huge plugin ecosystems, which is both a blessing (you can find ready-made plugins for a lot of tasks) and a curse
261.
▲
by
DCoder
11y ago
Yes, it is, but that doesn't excuse doing it here.
262.
▲
by
DCoder
11y ago
Note that this approach can expose the user entered password in application debug logs, MySQL's slow queries log (if you're not using bind variables), etc.
263.
▲
by
DCoder
11y ago
There was also https://lwn.net/Articles/57135/
264.
▲
by
DCoder
11y ago
The short lived "Team Knight Rider" series had a somewhat similar moment - the mechanic was working on the team's AI-equipped cars and talking to them, when the cars stopped talking back. [1] Mechanic: "Why won't yo
265.
▲
by
DCoder
11y ago
Interesting, I honestly don't know if that makes a difference.
266.
▲
by
DCoder
11y ago
There are some subtle behavioural differences between the Language Service and the regular compiler, for example: https://github.com/Microsoft/TypeScript/issues/5243
267.
▲
by
DCoder
11y ago
swax is probably referring to the compiler option "noImplicitAny", which can literally turn variables whose type is not explicitly specified and cannot be inferred from their declaration as errors, instead of assuming they have th
268.
▲
by
DCoder
11y ago
The code insight is one of the many reasons I switched from plain JavaScript to TypeScript and will not go back.
269.
▲
by
DCoder
11y ago
Would that make https://www.flightradar24.com/ a much bigger concern?
270.
▲
by
DCoder
11y ago
Vilnius, Lithuania: http://stops.lt/vilnius/#vilnius/map/en (click "Show vehicles").
More ›