// inlined from https://github.com/EskiMojo14/uncheckedindexed // relies on remaining as a TS file, not .d.ts type IfMaybeUndefined = [undefined] extends [T] ? True : False const testAccess = ({} as Record)['a'] export type IfUncheckedIndexedAccess = IfMaybeUndefined< typeof testAccess, True, False > export type UncheckedIndexedAccess = IfUncheckedIndexedAccess< T | undefined, T >