Open thekevinbrown opened 4 years ago
Hi, thanks for asking the question. TypeScript was supported in the very early versions of the framework. However, after publishing version 2, I haven't added TypeScript support back. I will look into this scenario and report back in a few days.
Thanks @jruizgit, that'd be awesome. Also we're happy to help with contributing and/or maintaining a set of types for use with TypeScript.
The main question / difficulty at this point is around the syntax errors in Jest and TypeScript (basically any tools that want to parse the input). We intend to write a suite of tests for our rules in Jest so that we can see if rule changes in the future cause any unexpected behaviour regressions in other areas of the system that the rule author wasn't intending.
Hey @jruizgit,
I think I can figure out most of this if I can get past the syntax errors. Any hints on a syntactically valid way to express the above?
@jruizgit anything I can do to help here?
I noticed that at some point there was Typescript support (https://github.com/jruizgit/rules/issues/15).
I don't see any type definitions in the NPM package, and
@types/durable
doesn't seem to work. Is there an example of how to do this somewhere?I'm also really struggling in general because the examples don't look like normal Javascript to me. (Functions with kind of object bodies in them?) So both typescript and javascript tools like Jest are giving me syntax errors. I noticed there's mention of strict mode, but for example, how could I define something like this in TypeScript?