type Tokenize<P,Token,Res>
Converts a path string into separate tokens in a string array.
Definition
type Tokenize<P extends string, Token extends string = '', Res extends string[] = []> = P extends '' ?
Path.Internal.AppendIfNotEmpty
<Res, Token> : P extends `[${infer Index}]${infer Rest}` ?
Tokenize
<Rest, '', [
...
Path.Internal.AppendIfNotEmpty
<Res, Token>,`<br/> `Index`<br/> `]> : P extends `?.${infer Rest}` ?
Tokenize
<Rest, '', [
...
Path.Internal.AppendIfNotEmpty
<Res, Token>,`<br/> `'?.'`<br/> `]> : P extends `.${infer Rest}` ?
Tokenize
<Rest, '', [...
Path.Internal.AppendIfNotEmpty
<Res, Token>, '.']> : P extends `${infer First}${infer Rest}` ?
Tokenize
`<Rest,
${Token}${First}, Res> : never```;