This file contains hidden or 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
packages/http/lib/auth.tsp | |
89:model ApiKeyAuth<TLocation extends ApiKeyLocation, TName extends string> { | |
packages/http/lib/http.tsp | |
15:model Response<Status> { | |
30:model Body<T> { | |
103:model PlainData<T> { | |
packages/json-schema/lib/main.tsp | |
158:model Json<T> { |
This file contains hidden or 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
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID8w+xPMnOAtzmVZKymO080hHnAl96rPv1TJ3z718bk1 wtemple@alto |
This file contains hidden or 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
/** | |
* Copyright (c) Will Temple 2022 | |
* | |
* # ELEMENTAL TYPE SYSTEM | |
* | |
* This module describes an elemental type system composed of only five | |
* fundamental type forms that I find to be highly expressive in simply-typed | |
* contexts. | |
* | |
* By simply-typed, I mean systems that do not include type-binding. |
This file contains hidden or 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
interface Foo { | |
a: string; | |
b: number; | |
bar: Bar; | |
} | |
interface Bar { | |
a: number; | |
b: string; | |
baz: Baz; |
This file contains hidden or 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
declare class Vehicle { | |
engines: number; | |
ignition(): void; | |
drive(): void; | |
} | |
declare class Car extends Vehicle { | |
wheels: number; | |
} |
This file contains hidden or 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
{ | |
"scripts": { | |
"rush:denial": "rushx clean && rushx build", | |
"rush:anger": "rush clean && rush rebuild", | |
"rush:bargaining": "rush clean && rush purge && rush update --full && rush rebuild", | |
"rush:depression": "while true; do rm -rf common/temp && npm run rush:bargaining; done", | |
"rush:acceptance": "cd ..; rm -rf azure-sdk-for-js; git clone https://github.com/azure/azure-sdk-for-js.git" | |
} | |
} |
This file contains hidden or 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
mod utils; | |
use wasm_bindgen::prelude::*; | |
mod vdom; | |
use vdom::*; | |
mod dom; | |
use dom::mount; |
This file contains hidden or 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
// This uses my modified version of typescript from my branch github.com/willmtemple/typescript#alchemy | |
import * as ts from "typescript/built/local/typescript"; | |
import * as fs from "fs"; | |
import * as os from "os"; | |
import { promisify } from "util"; | |
const readFile = promisify(fs.readFile); |
This file contains hidden or 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
declare export function match< | |
DiscriminatedUnion extends { [K in Discriminator]: string | number }, | |
Pattern extends Partial< | |
{ | |
[K in DiscriminatedUnion[Discriminator]]: ( | |
v: Extract<DiscriminatedUnion, { kind: K }> | |
) => any; | |
} | |
>, | |
Discriminator extends string | number = "kind" |
This file contains hidden or 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
interface DemoEnumPatternMap<T> { | |
Foo: (foo: Foo) => T, | |
Bar: (bar: Bar) => T | |
} | |
function matchDemoEnum<T>(value: DemoEnum, pattern: DemoEnumPatternMap<T>) : T { | |
switch (value.kind) { | |
case "Foo": | |
return pattern.Foo(value); | |
case "Bar": |
NewerOlder