This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Let's use type annotations to examing the runtime/size of things! | |
// You'll have more fun if you can hover over variables and see the types for yourself. | |
// Copy paste into here: https://www.typescriptlang.org/play | |
interface SConstant { __constant_size: true } | |
interface SLinear<T extends string> { __variable_size: T } | |
interface SPlus<T extends Size, U extends Size>{ __splusand_1: T, __splusand_2: U } | |
interface STimes<T extends Size, U extends Size>{ __stimesand_1: T, __stimesand_2: U } | |
type Size = SConstant | SLinear<string> | SPlus<Size, Size> | STimes <Size, Size> | |
// Declare some type brands, and a union of all the possibilites |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.querySelector('#readme').setAttribute('style', 'position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 100; background-color: white'); | |
document.querySelector('body').appendChild(document.querySelector('#readme')); | |
document.querySelector('article').style.borderWidth = 0; | |
window.print(); |