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:
539 bytes
|
Line | |
---|
1 | import { List } from '../List/List';
|
---|
2 | import { Literal } from './_Internal';
|
---|
3 | import { Cast } from '../Any/Cast';
|
---|
4 | /**
|
---|
5 | * @hidden
|
---|
6 | */
|
---|
7 | declare type _Join<T extends List, D extends string> = T extends [] ? '' : T extends [Literal] ? `${T[0]}` : T extends [Literal, ...infer R] ? `${T[0]}${D}${_Join<R, D>}` : string;
|
---|
8 | /**
|
---|
9 | * Concat many literals together
|
---|
10 | * @param T to concat
|
---|
11 | * @param D to delimit
|
---|
12 | */
|
---|
13 | export declare type Join<T extends List<Literal>, D extends string = ''> = _Join<T, D> extends infer X ? Cast<X, string> : never;
|
---|
14 | export {};
|
---|
Note:
See
TracBrowser
for help on using the repository browser.