News for hackers. Stuff that matters.
Re:Deep introduction to class decorators in TypeScript by davidmurdoch on Tuesday February 15, 2022 @10:17PM (#30355977)
Sounds like you were bitten by Jest inadequacies, no?
Re:Deep introduction to class decorators in TypeScript by frenchy on Tuesday February 15, 2022 @10:21PM (#30355998)
Jest is inadequate because it doesn't support some non-standard experimental feature that was shoehorned into TypesScript to make it look more like C#?
Re:Deep introduction to class decorators in TypeScript by davidmurdoch on Tuesday February 15, 2022 @10:32PM (#30356052)
This is a JavaScript feature and confusing the two makes finding answers to Typescript questions much harder.

But yes, I think jest, a "JavaScript testing framework designed to ensure correctness of any JavaScript codebase" should support JavaScript features, even the ones you don't like the provenance of.

Re:Deep introduction to class decorators in TypeScript by magicalist on Tuesday February 15, 2022 @11:23PM (#30356339)
But decorators aren't a JavaScript feature, that's the point of this comment thread.

Some form of them might eventually be a JavaScript feature, but anything using them now is potentially incompatible with that future form.

Re:Deep introduction to class decorators in TypeScript by davidmurdoch on Wednesday February 16, 2022 @11:51AM (#30362323)
Oh yeah, sorry, I shouldn't have worded it that way. the decorators are being transpiled at runtime to standard JS, so why shouldn't tooling like jest be able to work with that?
Re:Deep introduction to class decorators in TypeScript by xtracto on Wednesday February 16, 2022 @01:14PM (#30363493)
Because there is something wrong happening while the transpilation of the non-standard feature is happening.