You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Also: `type GetReadonlyKeys<T, K = keyof T> = K extends keyof T ? Equal<Pick<T, K>, Pick<Readonly<T>, K>> extends true ? K : never : never;` with the `Pick`, `Readonly` and `Equal` helper
export type GetReadonlyKeys<T> =
{
[K in keyof T]-?:
(<U>() => U extends { [KK in K]: T[KK] } ? 2 : 1) extends
(<U>() => U extends { readonly [KK in K]: T[KK] } ? 2 : 1)