josdejong
  • Joined on 2022-10-05
josdejong pushed to ts-macros-issues at glen/typocomath 2023-09-21 12:27:13 +00:00
ce974e2a99 log the reflectedType of complex square root
4947a80cb4 chore: make pnpm go work cross platform
Compare 2 commits »
josdejong pushed to approach6_infer_js_to_ts at glen/typocomath 2023-09-21 09:56:07 +00:00
8c65387ef0 chore: add a TODO
josdejong commented on issue glen/typocomath#5 2023-09-18 16:17:00 +00:00
Inferring TypeScript types

I guess you're right.

If not, what will you work on on Thursday?

It makes sense to do some more fiddling with the custom TypeScript Plugin, I'll do that (unless there is other news by…

josdejong commented on issue glen/typocomath#5 2023-09-18 07:16:33 +00:00
Inferring TypeScript types

🤔 that is a bummer. Let's see indeed if this can be fixed in ts-macros.

Is there a way to work around it? If this is a special edge case, and 90% of the functions work just fine, it may…

josdejong commented on issue glen/typocomath#10 2023-09-15 16:19:12 +00:00
Trajectory for Typocomath

💪

josdejong commented on issue glen/typocomath#10 2023-09-15 15:18:05 +00:00
Trajectory for Typocomath

Well, we have to decide, right? The ts-macros approach all in all looks most promising to me for a TS approach for mathjs. Still, the goal of the POC is to validate whether it works out…

josdejong commented on issue glen/typocomath#10 2023-09-15 07:36:37 +00:00
Trajectory for Typocomath

As discussed here, I've done some more experimenting last weeks:

  • (A) I've experimented more with template…
josdejong commented on issue glen/typocomath#7 2023-09-15 07:25:37 +00:00
Approach6: infer TS from JS template literal

Well, I still have large concerns here too. It requires a lot of effort to get something working, and we still have a lot to figure out.

Next steps are defining interfaces as strings like `{…

josdejong commented on issue glen/typocomath#7 2023-09-14 17:47:54 +00:00
Approach6: infer TS from JS template literal

I gave the template literal type another go. I found a stackoverflow answer that helped a lot, and now the solution…

josdejong pushed to approach6_infer_js_to_ts at glen/typocomath 2023-09-14 17:44:22 +00:00
5d256a468f Fix function name Square
josdejong pushed to approach6_infer_js_to_ts at glen/typocomath 2023-09-14 17:32:36 +00:00
1c48e57ea1 Move the TODO's up
josdejong pushed to approach6_infer_js_to_ts at glen/typocomath 2023-09-14 17:32:07 +00:00
a4f5af3ea5 Defined the signature of the function that is being created too
7dc26ea297 get template literals working with multiple dependencies
Compare 2 commits »
josdejong pushed to approach6_infer_js_to_ts at glen/typocomath 2023-09-14 12:59:40 +00:00
722ee05a0a resolve any number of arguments
josdejong commented on issue glen/typocomath#10 2023-09-11 16:40:49 +00:00
Trajectory for Typocomath

Huh, even though you did the

after pnpm install, you must execute npx ts-patch install to activate the ts-macros compiler plugin.

O wow, that's just it... I feel a bit stupid,…

josdejong commented on issue glen/typocomath#10 2023-09-11 16:22:56 +00:00
Trajectory for Typocomath

I've done some more experimenting with a plugin of our own. I didn't manage to get the resolved types out of it. I know it is possible (using functionsl getTypeAtLocation, getResolvedSignature,…

josdejong pushed to experiment/typescript_plugin at glen/typocomath 2023-09-11 15:50:20 +00:00
ab7fc4450e add another try
josdejong pushed to experiment/typescript_plugin at glen/typocomath 2023-09-11 14:10:42 +00:00
94a0737555 update pnpm lock file
josdejong pushed to experiment/typescript_plugin at glen/typocomath 2023-09-11 14:08:01 +00:00
24bcf34b60 try getting resolved type arguments (WIP)
josdejong commented on issue glen/typocomath#10 2023-09-08 14:29:19 +00:00
Trajectory for Typocomath

yes indeed. I'm changing it to be something like the following, matching $reflect (or whatever name we want):

export const square = $reflect(<T>(dep: Dependencies<'multiply', T>): (a:
josdejong pushed to experiment/typescript_plugin at glen/typocomath 2023-09-08 12:25:24 +00:00
232d5d4a96 make defining __infer__ redundant
7fc9d2a2f3 remove name argument from the reflect function
Compare 2 commits »