Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
type ReadonlyObj<T> = { readonly [K in string]: T }
const foo: ReadonlyArray<T> = [1,2,3]
const bar: ReadonlyObj = { a: 1, b: 2, c: 3 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment