source: node_modules/ts-toolbelt/out/String/Replace.d.ts@ d24f17c

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: 485 bytes
Line 
1import { Cast } from '../Any/Cast';
2import { Literal } from './_Internal';
3/**
4 * @hidden
5 */
6declare type _Replace<S extends string, R extends Literal, W extends Literal> = S extends `${infer BS}${R}${infer AS}` ? Replace<`${BS}${W}${AS}`, R, W> : S;
7/**
8 * Replace `R` with `W` in `S`
9 * @param S
10 * @param R
11 * @param W
12 */
13export declare type Replace<S extends string, R extends Literal, W extends Literal> = _Replace<S, R, W> extends infer X ? Cast<X, string> : never;
14export {};
Note: See TracBrowser for help on using the repository browser.