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:
412 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | import { Is } from '../Any/Is';
|
---|
| 2 | import { Match } from '../Any/_Internal';
|
---|
| 3 | /**
|
---|
| 4 | * Replace `M` with `A` in `U`
|
---|
| 5 | * @param U to update
|
---|
| 6 | * @param M to select
|
---|
| 7 | * @param A to update with
|
---|
| 8 | * @returns [[Union]]
|
---|
| 9 | * @example
|
---|
| 10 | * ```ts
|
---|
| 11 | * ```
|
---|
| 12 | */
|
---|
| 13 | export declare type Replace<U extends any, M extends any, A extends any, match extends Match = 'default'> = U extends unknown ? {
|
---|
| 14 | 1: A;
|
---|
| 15 | 0: U;
|
---|
| 16 | }[Is<U, M, match>] : never;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.