Skip to content

Instantly share code, notes, and snippets.

@bcherny
bcherny / using-typescript-and-angular-1.x-in-the-real-world.md
Last active October 9, 2022 12:55
Using Typescript + Angular 1.x in the Real World

Work in progress!

A little while ago I started using Typescript with the Angular 1.5 app I'm working on, to help ease the migration path to Angular 2. Here's how I did it. We'll go example by example through migrating real world code living in a large, mostly non-Typescript codebase.

Let's start with a few of the basic angular building blocks, then we'll go through some of the higher level patterns we derived.

Filters

Javascript

@mikaelbr
mikaelbr / destructuring.js
Last active April 25, 2024 13:21
Complete collection of JavaScript destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => [1, 2, 3];
@glennblock
glennblock / fork forced sync
Created March 4, 2012 19:27
Force your forked repo to be the same as upstream.
git fetch upstream
git reset --hard upstream/master