appwrite / appwrite/sdk-for-cli

TypeScript enums

Open
#277 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
100
Forks
45
Avg merge
1d 1h
Merged PRs (30d)
5

Description

### 🔖 Enhancement description

Is there a way to, instead of generating enums, generate types and constants, e.g.

### 🎤 Pitch

From:
```
export enum ItemsRunItemOrigin {
TEMPLATE = 'template',
CARRYOVER = 'carryover',
ADHOC = 'adhoc',
}
```

to

```
export const ItemsRunItemOrigin = {
TEMPLATE = 'template',
CARRYOVER = 'carryover',
ADHOC = 'adhoc',
} as const;

export type ItemsRunItemOrigin = typeof ItemsRunItemOrigin[keyof typeof ItemsRunItemOrigin];
```
Thank you very much in advance

### 👀 Have you spent some time to check if this issue has been raised before?

- [x] I checked and didn't find similar issue

### 🏢 Have you read the Code of Conduct?

- [x] I have read the [Code of Conduct](https://github.com/appwrite/.github/blob/main/CODE_OF_CONDUCT.md)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.