josdejong
  • Joined on 2022-10-05
josdejong commented on pull request glen/typocomath#17 2023-10-18 12:18:26 +00:00
feat: Runtime type reflection

🎉

josdejong commented on issue glen/typocomath#10 2023-10-16 10:35:30 +00:00
Trajectory for Typocomath

Thanks for checking out https://docs.rttist.org/. I expect that a different library can possibly only improve on syntax or compile-time performance of ts-macros. The main question we want to…

josdejong commented on issue glen/typocomath#10 2023-10-11 08:38:31 +00:00
Trajectory for Typocomath

😂 $reflecTypes. I expect it will lead to confusion though, it looks like a typo, so we have to change it to $reflectTypes in the end I think. But totally fine with me to keep it in for now…

josdejong commented on issue glen/typocomath#10 2023-10-04 14:54:13 +00:00
Trajectory for Typocomath

I say let's continue with your latest approach:

export const sqrt = ...
$reflect!(sqrt)

I'll see if I can add this & { reflectedType: string } type information somehow, but…

josdejong commented on issue glen/typocomath#10 2023-10-04 13:31:28 +00:00
Trajectory for Typocomath

I really like to separate the $reflect from the "clean" TS function. I also like your idea of invoking $reflect with multiple functions in one go, that will be very handy and compact in files…

josdejong commented on issue glen/typocomath#10 2023-09-29 13:42:49 +00:00
Trajectory for Typocomath

I did two small steps:

  1. upgrade to ts-macros@2.5.0 instead of using the git source. Ok if I merge ts-macros-issues into main and then delete ts-macros-issues and ts-macros?
  2. I…
josdejong pushed to ts-macros-issues at glen/typocomath 2023-09-29 13:36:32 +00:00
20236355c1 feat: do not generate export via macro but keep the export in TS for better DX
josdejong commented on issue glen/typocomath#7 2023-09-29 12:17:39 +00:00
Approach6: infer TS from JS template literal

I'll close this issue again, we're not actively working on this approach and not planning for that either.

josdejong closed issue glen/typocomath#7 2023-09-29 12:17:39 +00:00
Approach6: infer TS from JS template literal
josdejong pushed to ts-macros-issues at glen/typocomath 2023-09-28 09:30:50 +00:00
632c82966b chore: upgrade to ts-macros@5.2.0 instead of directly from git
josdejong commented on issue glen/typocomath#10 2023-09-22 17:56:00 +00:00
Trajectory for Typocomath

O sorry, I was under the assumption that we can leave the core of the pocomath Dispatcher more or less as-is for the typocomath POC. You've written the core, so you know best and if you say it…

josdejong commented on issue glen/typocomath#10 2023-09-22 08:06:43 +00:00
Trajectory for Typocomath

I think by far the biggest piece is writing the guts of the dispatcher.

We will indeed have to rewrite the dispatcher in a solution that has the typed-function functionality integrated/merged.…

josdejong commented on issue glen/typocomath#10 2023-09-22 07:47:32 +00:00
Trajectory for Typocomath

Continuation from glen/typocomath#5 (comment)...

Great! That's a nice chunk of work. If you're comfortable just moving ahead with ts-macros for…

josdejong commented on issue glen/typocomath#5 2023-09-22 07:45:34 +00:00
Inferring TypeScript types

Yeah sorry I should have posted in #10, I'll continue there...

josdejong commented on issue glen/typocomath#5 2023-09-21 19:18:09 +00:00
Inferring TypeScript types

I was thinking about how it would be easiest to create a typocomath similar to pocomath (and working for real). I was thinking about these steps:

  1. merge the ts-macros-issues branch into…
josdejong commented on issue glen/typocomath#5 2023-09-21 19:10:27 +00:00
Inferring TypeScript types

Here the console output for three different functions. It looks like we have all the information that we need!

1) NUMBER SQRT
1.1) REFLECTED TYPE: "(dep: configDependency & { complex:
josdejong pushed to ts-macros-issues at glen/typocomath 2023-09-21 19:09:14 +00:00
2f7677c371 chore: output the reflected types enclosed in quotes for clarity
josdejong commented on issue glen/typocomath#5 2023-09-21 19:06:45 +00:00
Inferring TypeScript types

Ok today I've done the following:

  • Make the scripts work cross platform (sorry, I couldn't get mkdir and cp working Windows even with pnpm shell-emulator, could be that I'm doing something…
josdejong pushed to ts-macros-issues at glen/typocomath 2023-09-21 19:01:51 +00:00
1ca0ac42d0 feate: implement a basic parser for the reflected types
fd4ecd70ba chore: use exact version numbers
Compare 2 commits »
josdejong pushed to ts-macros-issues at glen/typocomath 2023-09-21 13:02:51 +00:00
0ebaaf35ee feat: convert sqrt for numbers
20078d2c87 use ts-macros directly from Github until v2.4.2 is published on npm
Compare 2 commits »