main
Last change
on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
689 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | import { Match } from '../Any/_Internal';
|
---|
| 2 | import { Is } from '../Any/Is';
|
---|
| 3 | /**
|
---|
| 4 | * @hidden
|
---|
| 5 | */
|
---|
| 6 | export declare type _Replace<O extends object, M extends any, A extends any, match extends Match> = {
|
---|
| 7 | [K in keyof O]: {
|
---|
| 8 | 1: A;
|
---|
| 9 | 0: O[K];
|
---|
| 10 | }[Is<M, O[K], match>];
|
---|
| 11 | } & {};
|
---|
| 12 | /**
|
---|
| 13 | * Update with `A` the fields of `O` that match `M`
|
---|
| 14 | * @param O to update
|
---|
| 15 | * @param M to select fields
|
---|
| 16 | * @param A to update with
|
---|
| 17 | * @param match (?=`'default'`) to change precision
|
---|
| 18 | * @returns [[Object]]
|
---|
| 19 | * @example
|
---|
| 20 | * ```ts
|
---|
| 21 | * ```
|
---|
| 22 | */
|
---|
| 23 | export declare type Replace<O extends object, M extends any, A extends any, match extends Match = 'default'> = O extends unknown ? _Replace<O, M, A, match> : never;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.