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