Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
17 lines
440 B
Plaintext
17 lines
440 B
Plaintext
// inlined from https://github.com/EskiMojo14/uncheckedindexed
|
|
// relies on remaining as a TS file, not .d.ts
|
|
type IfMaybeUndefined<T, True, False> = [undefined] extends [T] ? True : False
|
|
|
|
const testAccess = ({} as Record<string, 0>)['a']
|
|
|
|
export type IfUncheckedIndexedAccess<True, False> = IfMaybeUndefined<
|
|
typeof testAccess,
|
|
True,
|
|
False
|
|
>
|
|
|
|
export type UncheckedIndexedAccess<T> = IfUncheckedIndexedAccess<
|
|
T | undefined,
|
|
T
|
|
>
|