declare var somelib: any;
Done. Now the compiler and everything else will know that there's a global variable called `somelib` that does not have a specific type, and no matter how you use that variable, it's ok, you know what you're doing.1,260 karma · joined November 2, 2009
declare var somelib: any;
Done. Now the compiler and everything else will know that there's a global variable called `somelib` that does not have a specific type, and no matter how you use that variable, it's ok, you know what you're doing.[0]: https://bugzilla.mozilla.org/show_bug.cgi?id=1221206#c10
ES7 wanted to introduce an Array#contains method. But due to prototype extension issues like https://esdiscuss.org/topic/having-a-non-enumerable-array-pr... , they had to rename it to Array#includes ...
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 promises, you can be in for a few surprises when trying to use other libraries (or even when updating to jQuery 3).
(I used to be the lead developer of Ares for several years, the amount of reverse-engineering and C++ voodoo involved was awesome.)
1: http://ares.strategy-x.com/
2: https://ares-developers.github.io/Ares-docs/bugfixes/type1/i...
Serious question: how much is "a lot of money' in this case? How much does an attack like this cost?
To be honest, I prefer learning by reading specs/documentation, tinkering and Google-ing specific bits, not by watching tutorials, so I did not know this. That's not ideal conceptually, but it does mean one less tool in the pipeline, which is not a bad thing for beginners.
> it would be nice for web development to grow out of its "oooh shiny" phase.
Absolutely. Just as long as it doesn't swing to the other extreme, like PHP does, where 12-year-old and deprecated techniques are still entrenched at the top of Google... :)
It actually searches both the location of the executable and the CWD: https://support.microsoft.com/en-us/kb/2389418#mt1
After trying out Grunt and Gulp, I found Gulp to be more to my liking because the tasks are written as actual JS code, not as a pile of configuration. Plus, it runs the tasks in parallel if they don't depend on each other, whereas Grunt defaults to running them sequentially.
gulp-autoprefixer -- CSS vendor prefixes
gulp-concat -- concatenates multiple files into one
gulp-cssmin -- CSS minifier
gulp-imagemin -- image optimizer/minifier
gulp-rename -- renames files produced by other streams
gulp-ruby-sass -- transpiles SASS to CSS
gulp-template -- interpolates some variables, e.g. environment settings or external dependency URLs, into a file (basically lodash's .template )
gulp-typescript -- transpiles TypeScript to JS
gulp-uglify -- JS minifier
gulp-util -- provides things like access to environment variables, console.log replacement, Gulp-specific throwable errors
gulp-watch -- automatically recompiles when source files change
gulp.spritesmith -- converts images to CSS spritesGrunt 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 (everything moves very rapidly, plugins get abandoned, blacklisted and superseded all the time - if you want to compile TypeScript files, half the blogposts will recommend gulp-tsc .. but wait, it's been blacklisted, you should use gulp-typescript instead ).
Grunt: ~5400 plugins: http://gruntjs.com/plugins
Gulp: ~2000 plugins: http://gulpjs.com/plugins/
Gulp's list of blacklisted plugins: https://github.com/gulpjs/plugins/blob/master/src/blackList....
Mechanic: "Why won't you answer me?"
Terrorist appears next to him: "Because it's just a car, you freak."