josdejong
  • Joined on 2022-10-05
josdejong commented on issue glen/typocomath#10 2023-09-06 10:30:20 +00:00
Trajectory for Typocomath

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…

josdejong pushed to experiment/typescript_plugin at glen/typocomath 2023-09-01 18:54:49 +00:00
26631febf9 add a TODO explaining the plan
josdejong commented on issue glen/typocomath#10 2023-09-01 16:48:17 +00:00
Trajectory for Typocomath

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

josdejong pushed to experiment/typescript_plugin at glen/typocomath 2023-09-01 16:43:09 +00:00
3967f5ce2b let TypeScript output ES modules
josdejong pushed to experiment/typescript_plugin at glen/typocomath 2023-09-01 16:37:00 +00:00
d50c1a9ccf some refinements in the plugin
cbb79d46fe cleanup old experiments and typescript-rtti, update readme
dea521029e Get a real TypeScript plugin working
Compare 3 commits »
josdejong commented on issue glen/typocomath#10 2023-09-01 12:58:08 +00:00
Trajectory for Typocomath

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.

josdejong commented on issue glen/typocomath#10 2023-09-01 12:51:08 +00:00
Trajectory for Typocomath

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:

josdejong commented on issue glen/typocomath#5 2023-08-30 14:57:10 +00:00
Inferring TypeScript types

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.

josdejong commented on issue glen/typocomath#5 2023-08-30 11:45:08 +00:00
Inferring TypeScript types

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…
josdejong commented on issue glen/typocomath#5 2023-08-30 10:56:11 +00:00
Inferring TypeScript types

Ok clear, thanks for the update.

josdejong commented on issue glen/typocomath#9 2023-08-22 18:32:11 +00:00
Create a build script for typocomath

👍

I have a slight preference for build as output folder, thanks!

josdejong commented on issue glen/typocomath#5 2023-08-21 16:11:51 +00:00
Inferring TypeScript types

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 😄

josdejong commented on issue glen/typocomath#5 2023-08-21 15:09:37 +00:00
Inferring TypeScript types

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…

josdejong commented on issue glen/typocomath#5 2023-08-21 14:44:52 +00:00
Inferring TypeScript types

That sounds promising 😎 , let's discuss the options.

josdejong commented on issue glen/typocomath#5 2023-08-18 16:01:43 +00:00
Inferring TypeScript types

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?…

josdejong commented on issue glen/typocomath#5 2023-08-18 15:58:11 +00:00
Inferring TypeScript types

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…

josdejong pushed to experiment/typescript_plugin at glen/typocomath 2023-08-18 15:40:20 +00:00
2cb8bc0099 Cleanup a temporary console.log
3653077c95 Add an experiment reading out a JSDoc comment
Compare 2 commits »
josdejong commented on issue glen/typocomath#5 2023-08-18 13:00:21 +00:00
Inferring TypeScript types

Oh maybe this is something: https://github.com/blainehansen/macro-ts

josdejong commented on issue glen/typocomath#5 2023-08-18 12:58:48 +00:00
Inferring TypeScript types

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…

josdejong commented on issue glen/typocomath#5 2023-08-18 12:34:26 +00:00
Inferring TypeScript types

Just reading up on all we wrote last time...

Some very short first thoughts:

  1. That's a lot of new experiments with alternative TS runtime checkers, thanks for researching and trying them…