source: node_modules/ts-toolbelt/out/String/Split.d.ts

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: 618 bytes
Line 
1import { Cast } from '../Any/Cast';
2import { Pop } from '../List/Pop';
3/**
4 * @ignore
5 */
6declare type __Split<S extends string, D extends string, T extends string[] = []> = S extends `${infer BS}${D}${infer AS}` ? __Split<AS, D, [...T, BS]> : [...T, S];
7/**
8 * @hidden
9 */
10declare type _Split<S extends string, D extends string = ''> = D extends '' ? Pop<__Split<S, D>> : __Split<S, D>;
11/**
12 * Split `S` by `D` into a [[List]]
13 * @param S to split up
14 * @param D to split at
15 */
16export declare type Split<S extends string, D extends string = ''> = _Split<S, D> extends infer X ? Cast<X, string[]> : never;
17export {};
Note: See TracBrowser for help on using the repository browser.