Skip to content

Instantly share code, notes, and snippets.

@simlrh
simlrh / getKeys.ts
Last active March 2, 2021 17:45
Miscellaneous TypeScript helpers
// 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>;
}
@simlrh
simlrh / machine.js
Created March 4, 2020 16:33
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@simlrh
simlrh / machine.js
Last active March 10, 2020 12:42
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@simlrh
simlrh / machine.js
Created March 13, 2020 13:39
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions