josdejong
  • Joined on 2022-10-05
josdejong commented on issue glen/typocomath#6 2023-01-13 12:08:11 +00:00
Status of supplying implementations and dependencies

@glen what is your opinion on how to implement functions that have multiple signatures, like eigs and say format?

math.eigs(x)
math.eigs(x, precision)

math.mean(a, b, c, ...)
math.…
josdejong commented on issue glen/typocomath#6 2023-01-13 12:01:15 +00:00
Status of supplying implementations and dependencies

Sorry for the delay, I was sick.

I've briefly gone though the current set of functions of mathjs. Some observations:

  1. Most functions are either a function with a clear API that can be…
josdejong commented on issue glen/typocomath#6 2023-01-04 15:23:36 +00:00
Status of supplying implementations and dependencies

ah, yeah, you're right. So, yes, the alternative is to come up with an API specifying individual parameters again, like Dependencies<'add', [T, T]>.

I'm ok with the syntax of both…

josdejong commented on issue glen/typocomath#6 2023-01-04 13:38:38 +00:00
Status of supplying implementations and dependencies

I've pushed a branch approach4.6

I've tried an additional API like `DependencyAlias<'addComplex', 'add', Complex<numbe…

josdejong created branch approach4.6 in glen/typocomath 2023-01-04 13:32:54 +00:00
josdejong pushed to approach4.6 at glen/typocomath 2023-01-04 13:32:54 +00:00
bd05dc9267 chore: make SignatureKey generic instead of using unknown
e468ec72dd chore: rephrase two todo's
0ea786dcc2 chore: show how to inject multiple instances of the same function (WIP)
d147d0a576 chore: implement AliasOf
1b9d6b6428 chore: use direct function definitions instead of { params, returns }
Compare 7 commits »
josdejong commented on issue glen/typocomath#6 2023-01-04 10:56:18 +00:00
Status of supplying implementations and dependencies

Thanks, this makes sense. Agree

The following notation reads very clear to me:

{addComplex: Signature<'add', Complex<number>>, 
 addNumbers: Signature<'add', number>}

We…

josdejong commented on issue glen/typocomath#6 2022-12-30 09:16:16 +00:00
Status of supplying implementations and dependencies

Good summary. Agree, lets work this out in revision 4.6.

afbeelding

About aliases: thinking aloud here. In some cases, like say add

josdejong commented on issue glen/typocomath#7 2022-12-29 10:56:25 +00:00
Approach6: infer TS from JS template literal

This is a bit of the "opposite" of what we tried in #123: there, we where trying to make typed(...) return a full-fledged TS interface.…

josdejong commented on issue glen/typocomath#6 2022-12-29 10:52:56 +00:00
Status of supplying implementations and dependencies

😂 you're getting poetic.

I like the approaches 4.5 and 2.5 a lot, thanks! Feels like we're getting there. Let's discuss today in a video call.

josdejong opened issue glen/typocomath#7 2022-12-24 19:33:55 +00:00
Approach6: infer TS from JS template literal
josdejong created branch approach6_infer_js_to_ts in glen/typocomath 2022-12-24 19:17:44 +00:00
josdejong pushed to approach6_infer_js_to_ts at glen/typocomath 2022-12-24 19:17:44 +00:00
11792e0435 experiment inferring TS types from a JS template
josdejong pushed to approach4_typealias at glen/typocomath 2022-12-23 16:27:28 +00:00
a5848125e4 fix and test absquare for quaternion
josdejong pushed to approach3_plain at glen/typocomath 2022-12-23 16:18:38 +00:00
40c7cd36af fix and test absquare for quaternion
josdejong opened issue glen/typocomath#5 2022-12-23 13:12:11 +00:00
Inferring TypeScript types
josdejong created branch approach4_typealias in glen/typocomath 2022-12-23 12:56:08 +00:00
josdejong pushed to approach4_typealias at glen/typocomath 2022-12-23 12:56:08 +00:00
60ce6212b4 convert code to type aliases
josdejong created branch approach3_plain in glen/typocomath 2022-12-23 12:56:01 +00:00
josdejong pushed to approach3_plain at glen/typocomath 2022-12-23 12:56:01 +00:00
04024a2a8d fix a TS issue
cbd1719227 experiment: convert all implementations to plain types
Compare 2 commits »