DenisFrezzato / hyper-ts

Type safe middleware architecture for HTTP servers
https://denisfrezzato.github.io/hyper-ts/
MIT License
393 stars 18 forks source link

remove Status enum #8

Closed gcanti closed 6 years ago

gcanti commented 6 years ago

(numeric) enums look unsafe

const enum E {
  A = 1,
  B = 2
}

declare function f(e: E): void

f(1000) // WAT
leemhenson commented 6 years ago

Yeah, those numeric enums will catch a few people out I expect. Not intuitive.

gcanti commented 6 years ago

Indeed, I never used an enum before hyper-ts, I thought is was a good idea but didn't expect that weird behavior

gcanti commented 6 years ago

Released (@next)