aboutsummaryrefslogtreecommitdiff
path: root/entries/braxtonh/types/test.ts
blob: 2ce83e7b888ab7c7ed93a5fa9e84b16352fb0db8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import {Zero, Succ, Fib} from "./index";

const zero: Zero = "😰";
const one: Succ<typeof zero> = {prev: zero};
const two: Succ<typeof one> = {prev: one};
const three: Succ<typeof two> = {prev: two};
const four: Succ<typeof three> = {prev: three};
const five: Succ<typeof four> = {prev: four};
const six: Succ<typeof five> = {prev: five};
const seven: Succ<typeof six> = {prev: six};
const eight: Succ<typeof seven> = {prev: seven};

const fibZero: Fib<typeof zero> = zero;
const fibOne: Fib<typeof one> = one;
const fibTwo: Fib<typeof two> = one;
const fibThree: Fib<typeof three> = two;
const fibFour: Fib<typeof four> = three;
const fibFive: Fib<typeof five> = five;
const fibSix: Fib<typeof six> = eight;