Menu

#L340

1 post

Feed
1 of 1 post
0Read More

I got a decorator to type check the generic of the class it's on and I'm way too happy about it

#typescript#reddittypescript#code#l340#class

In my framework, every handler has to write its route twice. Once in the decorator because the runtime needs the string, and once in the generic because the types need it. @Route('ban') class Ban extends Handler {} // no errors. cool.…

15s