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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
// Wrapper for Object.keys which sets the correct type | |
export function getKeys<T>(obj: T): Array<keyof T> { | |
return Object.keys(obj) as Array<keyof T>; | |
} |
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
interface Composable<B,C> { | |
(b: B): C; | |
I: <D>(f: (c: C) => D) => Composable<B,D>; | |
o: <A>(f: (a: A) => B) => Composable<A,C>; | |
} | |
/* | |
* Non-type safe internal function - type safety of result is guaranteed by | |
* allowing creation only through `I` and `o` functions and methods | |
*/ |
OlderNewer