main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
436 bytes
|
Line | |
---|
1 | /**
|
---|
2 | * @hidden
|
---|
3 | */
|
---|
4 | export declare type _CompulsoryKeys<O extends object> = {
|
---|
5 | [K in keyof O]-?: [O[K] & (undefined | null)] extends [never] ? K : never;
|
---|
6 | }[keyof O];
|
---|
7 | /**
|
---|
8 | * Get the keys of `O` that are [[Compulsory]]
|
---|
9 | *
|
---|
10 | * (⚠️ needs `--strictNullChecks` enabled)
|
---|
11 | * @param O
|
---|
12 | * @returns [[Key]]
|
---|
13 | * @example
|
---|
14 | * ```ts
|
---|
15 | * ```
|
---|
16 | */
|
---|
17 | export declare type CompulsoryKeys<O extends object> = O extends unknown ? _CompulsoryKeys<O> : never;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.