pea-sys
pea-sys
```ts // your answers type ToUnion = U extends unknown[]? U[number]: U type Without = T extends [infer S,...infer R]? S extends ToUnion ? Without : [S,...Without] :[] ```
```ts // your answers type ConstructTuple = L extends A ['length'] ? A : ConstructTuple ```
```ts // your answers type MapTypes = { [P in keyof T]: T[P] extends R["mapFrom"] ? R extends {} ? Equal extends true ? R["mapTo"] : never : never :...
```ts // your answers type Unique = T extends [infer F, ...infer R] ? true extends (U extends U ? Equal : never) ? Unique : [F, ...Unique] : []...
```ts // your answers type LastIndexOf = T extends [...infer A, infer B] ? Equal extends true ? A['length'] : LastIndexOf : -1 ```
```ts // your answers type Trunc = `${T}` extends `${infer U}.${infer _}` ? (U extends "" ? "0" : U) : `${T}`; ```
**Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: 1. Go to https://yahooquery.dpguthrie.com/ 2. Click on the link https://share.streamlit.io/app/dpguthrie-yahooquery-streamlit-app-eydpjo/...
```ts // your answers type GetMiddleElement = T extends [infer S, ...infer M, infer L] ? M['length'] extends 1 ? M : M['length'] extends 0 ? [S,L] : GetMiddleElement :T...
```ts // your answers type ParseUrlParams = `/${T}/` extends `${infer A}/:${infer B}/${infer C}` ? B | ParseUrlParams : never ```
```ts // your answers type CheckRepeatedChars = T extends `${infer L}${infer R}` ? R extends `${infer _}${L}${infer _}` ? true : CheckRepeatedChars : false ```