dotansimha / dotansimha/graphql-code-generator-community

typescript-react-query getKey should add as const

Open
#495 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
137
Forks
195
Avg merge
6h 20m
Merged PRs (30d)
16

Description

**Is your feature request related to a problem? Please describe.**

I am using keys programmatically, and the type they resolve to isn't ergonomic.
Eg.

```
(string | Exact<{
ulid: string;
}>)[]
```

**Describe the solution you'd like**

It would be much nicer for this type to resolve to

```
[string, Exact<{ ulid: string; }>]
```

Which is achievable if `as const` is added to the resulting array.

**Describe alternatives you've considered**

N/A

**Additional context**

N/A

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.