Yes, it looks like a simple home-made TS plugin may just do the job 😅
(A) I'll give that a try tomorrow, good to verify that. (B) There is no need for that, I was just trying out to create…
I just implemented my first TypeScript plugin, and it replaces all occurrences of the string '__infer__'
with the actual types of a function 😎
It's in the experiment/typescript_plugin
…
I'll be working on the defined experiments (template literals, typescript plugin, ts-macros) this afternoon and next week Thursday, and hope that we can make a decision end of next week.
Thanks, very clear summary!
(4) I think we can define something like the following. The dispatcher must be able to recognize whether it is importing a function or a type definition:
…
Ahh, sorry. I didn't receive a notification about glen/typocomath#10, turns out I was not watching typocomath
(now I do). I still have to read your comments.
Here a short recap of our meeting last week:
- We would like to start refactoring mathjs for real asap.
- It looks like using
ts-macros
just works like a charm to extract the types and make…
👍
I have a slight preference for build
as output folder, thanks!
I am definitely more interested in getting on with the trajectory of mathjs than in wrestling with the guts of TypeScript
Very good point, me too 😄
A thought: ts-macros
is a TypeScript plugin. If we look up what $typeToString
is doing under the hood, it may be just as easy to write our own TypeScript plugin (so we have full control and…
About supply_runtime
: ah, yes, I can run it now, though I have to create a temporary package.json
containing {"type":"module"}
to be able to run node obj
, don't you have that issue?…
Yeah, not a good idea to start using an inactive project.
I did a bit of experimenting in the experiment/typescript_plugin
branch to read JSDoc comments. The TypeScript compiler reads those…
Oh, and one more thought:
(5.) What we would like to do is use macros in our code base. For example https://www.sweetjs.org/ offers this. As far as I can see, Sweet.js only works with JS and…
Just reading up on all we wrote last time...
Some very short first thoughts:
- That's a lot of new experiments with alternative TS runtime checkers, thanks for researching and trying them…