We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa76852 commit 193a9c1Copy full SHA for 193a9c1
README.md
@@ -1,2 +1,46 @@
1
# golang-enum-to-ts
2
Transform Golang `enum` type to Typescript enum
3
+
4
+## Function
5
6
+### Before (Golang)
7
+```golang
8
+package some
9
10
+type Status int
11
12
+const (
13
+ Todo Status = iota
14
+ Done
15
+ Pending
16
+ InProgress
17
+)
18
19
+type Sex string
20
21
22
+ Female Sex = "female"
23
+ Male Sex = "male"
24
25
26
+func Abctext() {
27
+ //dadsad
28
+}
29
+```
30
31
+### After (Typescript)
32
33
+```ts
34
+namespace some {
35
+ export enum Sex {
36
+ Female = 'female',
37
+ Male = 'male',
38
+ }
39
+ export enum Status {
40
+ Pending = 2,
41
+ InProgress = 3,
42
+ Todo = 0,
43
+ Done = 1,
44
45
46
0 commit comments