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:
447 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | import { Has } from '../Union/Has';
|
---|
| 2 | import { List } from './List';
|
---|
| 3 | /**
|
---|
| 4 | * Get the shortest [[List]] of `L` & `L1`
|
---|
| 5 | * (`L` has priority if both lengths are equal)
|
---|
| 6 | * @param L to compare length
|
---|
| 7 | * @param L1 to compare length
|
---|
| 8 | * @returns `L | L1`
|
---|
| 9 | * @example
|
---|
| 10 | * ```ts
|
---|
| 11 | * ```
|
---|
| 12 | */
|
---|
| 13 | export declare type Shortest<L extends List, L1 extends List> = L extends unknown ? L1 extends unknown ? {
|
---|
| 14 | 0: L1;
|
---|
| 15 | 1: L;
|
---|
| 16 | }[Has<keyof L1, keyof L>] : never : never;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.