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:
423 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | import { At } from '../Any/At';
|
---|
| 2 | import { Key } from '../Any/Key';
|
---|
| 3 | /**
|
---|
| 4 | * Make the fields of `O` union the ones of `O1`
|
---|
| 5 | * @param O to union from
|
---|
| 6 | * @param O1 to union with
|
---|
| 7 | * @param K (?=`Key`) to chose fields
|
---|
| 8 | * @returns [[Object]]
|
---|
| 9 | * @example
|
---|
| 10 | * ```ts
|
---|
| 11 | * ```
|
---|
| 12 | */
|
---|
| 13 | export declare type Unionize<O extends object, O1 extends object, K extends Key = Key> = {
|
---|
| 14 | [P in keyof O]: P extends K ? O[P] | At<O1, P> : O[P];
|
---|
| 15 | } & {};
|
---|
Note:
See
TracBrowser
for help on using the repository browser.