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
|
Rev | Line | |
---|
[d24f17c] | 1 | import { Cast } from '../Any/Cast';
|
---|
| 2 | import { Literal } from './_Internal';
|
---|
| 3 | /**
|
---|
| 4 | * @hidden
|
---|
| 5 | */
|
---|
| 6 | declare 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 | */
|
---|
| 13 | export declare type Replace<S extends string, R extends Literal, W extends Literal> = _Replace<S, R, W> extends infer X ? Cast<X, string> : never;
|
---|
| 14 | export {};
|
---|
Note:
See
TracBrowser
for help on using the repository browser.