Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Add Tuple type #5

Open
CharString opened this issue Nov 10, 2023 · 0 comments
Open

Add Tuple type #5

CharString opened this issue Nov 10, 2023 · 0 comments

Comments

@CharString
Copy link
Collaborator

CharString commented Nov 10, 2023

To express an array of 2 tuples
[number, string][]

CharString added a commit to open-formulieren/open-forms that referenced this issue Nov 14, 2023
Forces expressions of type `string[][]`.

Accepting `[value: any, label: string][]` would require
open-formulieren/InferNoLogic#5

To allow

```ts
type Item = [value: any, label: string] | {value: any, label: string}
type ValidItemExpression = Item[]
```

open-formulieren/InferNoLogic#6 and even a union type!
CharString added a commit to open-formulieren/open-forms that referenced this issue Nov 16, 2023
Forces expressions of type `string[][]`.

Accepting `[value: any, label: string][]` would require
open-formulieren/InferNoLogic#5

To allow

```ts
type Item = [value: any, label: string] | {value: any, label: string}
type ValidItemExpression = Item[]
```

open-formulieren/InferNoLogic#6 and even a union type!
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant