Type check JavaScript files using JSDoc and Typescript 2.5
lessonDuration 1m 31sFree
Typescript 2.5 adds JSDoc type assertion support for javascript file via ts-check service.
Browse
Find courses, lessons, articles, talks, and podcasts.
793 results for "JavaScript"
Showing 145–168 · Page 7 of 34
lessonDuration 1m 31sFree
Typescript 2.5 adds JSDoc type assertion support for javascript file via ts-check service.
lessonDuration 1m 59sFree
With Node installed, you can begin running JavaScript directly in the terminal. The Node REPL allows you to execute any JavaScript expression to check the output. You can even install packages from npm and load you local JavaScript files to test how libraries and functions run.
lessonDuration 3m 33s
We write a function that converts a string to lowercase in WebAssembly, demonstrating how to set the input string from JavaScript. WASM Fiddle: https://wasdk.github.io/WasmFiddle/?h1s69 Demo Repo: https://github.com/guybedford/wasm-intro
lessonDuration 2m 46s
Using WASM Fiddle, we show how to write a simple number logger function that calls a consoleLog function defined in JavaScript. We then download and run the same function in a local project. WASM Fiddle: https://wasdk.github.io/WasmFiddle/?cvrmt Demo Repo: https://github.com/guybedford/wasm-intro
lessonDuration 3m 3s
We use an offset exporting function to get the address of a string in WebAssembly memory. We then create a typed array on top of the WebAssembly memory representing the raw string data, and decode that into a JavaScript string. WASM Fiddle: https://wasdk.github.io/WasmFiddle/?6wzgh Demo Repo: https://github.com/guybedford/wasm-intro
lessonDuration 7m 19sFree
Much of our code in real life is full of if statements that check the validity of a given input to see if a given computation should be performed. Using the ever popular Maybe construction allows us capture this disjunction in one place, keeping our functions free of similar if statements that can pollute the intention of the function. You do not even need a fancy library to get this benefit, as Javascript ships with everything you need with it's build in Array.
lessonDuration 2m 15sFree
TypeScript can actually be used just as a JavaScript -> JavaScript Transpiler e.g. ES6 -> ES5. This allows you to easily maintain your old JavaScript code base along with potentially uplifting to a TypeSafe version using a single compiler.
lessonDuration 2m 12sFree
Dealing with the special `NaN` value can be tricky in JavaScript. It behaves like a number and not a number at the same time. This lesson explains how to identify it using the `isNaN` function or the `Number.isNaN` method.
lessonDuration 1m 57sFree
Yarn is a new JavaScript package manager that aims to be speedy, deterministic, and secure. See how easy it is to drop yarn in where you were using npm before, and get faster, more reliable installs.
lessonDuration 3m 40s
Most of today’s websites use optimized, compiled, minified and obfuscated javascript and CSS. Examining this stuff here has some severely limited utility, which is why when developing we rely on sourcemaps. We’ll set up a webpack workflow that uses sourcemaps to show you how they can help your debugging!
lessonDuration 6m
In this lesson we'll learn two ways to construct a Regular Expression in Javascript, explore the methods available to us directly from the RegExp constructor, use Regular Expressions with String.prototype methods, and build a simple regex highlighter.
lessonDuration 3m 31sFree
We will look at bundling your JavaScript files using Gulp, Gulp-Concat, and Gulp-Uglify
lessonDuration 2m 43sFree
Many websites have more than just simple static content. Dynamic content which is rendered by JavaScript requires browser to be able to scrape data. This video demonstrates how to use Nightmare (which is a wrapper around Electron) to launch a url and scrape dynamic data.
lessonDuration 1m 35s
This is an introduction to the "How to Write a JavaScript Library" in which the scope of the series is presented. You will learn everything you need to know to create a library for JavaScript: set up the [GitHub](https://github.com) repo, publish a module to [npm](https://www.npmjs.com/), set up a test suite with code coverage reporting (using [Karma](http://karma-runner.github.io/), [Mocha](http://mochajs.org/), and [Chai](http://chaijs.com/)), add continuous integration, add ES6 (ES2015) with [Babel](http://babeljs.io/), configure [Webpack](http://webpack.github.io/), and distribute the library as a ["Universal JavaScript"](https://medium.com/@mjackson/universal-javascript-4761051b7ae9) (a.k.a. "Isomorphic JavaScript") module (consumable by both the browser and node).
lessonDuration 3m 3sFree
Changing context in JavaScript is only possible using call() and apply(). The bind() method on the function prototype use those methods to allow us to quickly change the context in which a function is executed in. Learn how bind works by recreating it.
lessonDuration 7m 40sFree
Avoid JavaScript optimization killers and ensure that Chrome and Node.js are executing your code as efficiently as possible. This video demonstrates several limitations of the V8 JavaScript engine's optimizing compiler and inliner. Information that is not only interesting, but can prove to be very useful.
lessonDuration 3m 15sFree
Javascript modules are a great way to isolate your code, but they are not very re-usable. If we implement the factory pattern inside of one of our modules we get code re-use without losing the encapsulation benefits of a javascript module.
lessonDuration 5m 5sFree
Javascript modules are a design pattern that allow you to encapsulate your code into smaller self managing pieces. They help you separate your code, protect your variables, and provide an easy way to expose only the parts of your component that you want to be exposed.
lessonDuration 5m 13sFree
The TypeScript compiler is a powerful tool which catches mistakes even in vanilla JavaScript. Try it online at the [TypeScript Playground](http://bit.ly/catching_javascript_mistakes), zero setup required.
lessonDuration 3m 39sFree
ng-html2js takes .html templates and converts them into strings stored in AngularJS's template cache. This allows you to bundle all of your templates into a single JavaScript file for simpler deployment and faster loading. John walks through using ng-html2js in the terminal to show what it does, but to integrate with either [gulp](https://www.npmjs.com/package/gulp-ng-html2js) or [grunt](https://www.npmjs.com/package/grunt-html2js), use the tool specific module.
lessonDuration 2m 2sFree
You can use Grunt to combine all of your Javascript files into a single concatenated file.
lessonDuration 6m 57sFree
How does AngularJS $scope relate to JavaScript function scope?
lessonDuration 5m 45sFree
This or that? Javascript scoping can be confusing. This lesson covers the very basics of function scoping.
lesson
When attempting to load the same module twice in JavaScript you'll hit a cache and code won't re-run. In scenarios where you actually do want to have state in your modules, you'll have to use a cache-busting technique by passing a query parameter to a dynamic import. This lesson walks through how to add a query parameter, how to add the appropriate types for loading dynamic modules in TypeScript, and when these techniques are valuable.