function isFish(pet: Fish | Bird): pet is Fish {
return (pet as Fish).swim !== undefined;
}
type Readonly<T> = {
readonly [P in keyof T]: P[T];
}
JS: typeof null
=> object
(why: https://2ality.com/2013/10/typeof-null.html)
Deploying Rails with webpack to Heroku (from Rails 5.1 loves Javascript)
heroku create
heroku buildpacks:add --index 1 heroku/nodejs
heroku buildpacks:add --index 2 heroku/ruby
git push heroku master