Commit Graph

16 Commits

Author SHA1 Message Date
ae2303af7c chore: Update to ts-macros@2.4.0 2023-08-26 10:14:02 -07:00
9eff2bc265 feat: Demonstrate macros to encapsulate the type-reflection process 2023-08-25 19:19:01 -07:00
af02f1cb29 feat: Simplify the reflected type of an implementation 2023-08-25 19:19:01 -07:00
da5b2c3467 feat: Demonstrate a trick for further resolving the dep type at compiletime 2023-08-25 19:19:01 -07:00
770c302342 feat: Precisely reflect the type of an implementation at runtime (!!) 2023-08-25 19:18:54 -07:00
180e772dab fix: Add types first and distinguish them semantically. (#15)
Rather than via some format on the name of the identifier, this commit
  changes the construction of Dispatcher to assume that functions are
  implementations and other objects are type specifiers.

  Also installs all types first, before any implementations.
  Resolves #3.
  Resolves #12.

Reviewed-on: #15
Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Co-committed-by: Glen Whitney <glen@studioinfinity.org>
2023-08-26 02:15:59 +00:00
327a9385ed fix: Use intersection of matching types in AssociatedTypes<> lookup (#14)
Resolves #11.
Reviewed-on: #14
Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Co-committed-by: Glen Whitney <glen@studioinfinity.org>
2023-08-23 16:52:16 +00:00
76e144bc2a feat: add build script (#13)
This commit adds pnpm scripts for compiling and running the
  typocomath package, and a convenience script `pnpm go` that does
  both in succession. It also configure pnpm to use a shell
  emulator so that it should work on Windows as well. Finally,
  it changes the directory for object files from obj to build.
  Resolves #9.

Reviewed-on: #13
Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Co-committed-by: Glen Whitney <glen@studioinfinity.org>
2023-08-23 03:20:10 +00:00
f06943ba1a chore: Update to latest TypeScript and make sure instructions work 2023-08-18 10:36:11 -07:00
cc1e66c054 Declare implementations and dependencies via standard interfaces for operations (#8)
Adds a new subdirectory `interfaces` where standard interfaces
  are defined. Additional interfaces for a given operation can
  be added with an `AliasOf` type operator. Provides type
  operators that give the return type, full function type, and
  the type of a dependency on, a given operator.

  Resolves #6.

Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
Reviewed-on: #8
2023-01-22 01:34:57 +00:00
3fa216d1f4 refactor: Major simplification in providing implementation types (#2)
This PR is an effort to address #1. It removes all boilerplate
  from individual implementation files, and moves it into
  a small, fixed section in the single `all.ts` module for each
  type that collects up all of the implementations relating
  to that type.

Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Reviewed-on: #2
2022-12-19 23:50:24 +00:00
29bcab1639 style: whitespace fixes 2022-12-19 17:14:26 -05:00
ccc6153786 feat: TypeScript typings for Dispatcher implementations
A first pass at specifying some implementations in TypeScript
  that actually compiles. It doesn't do anything, as installing
  types and operation specifications are currently dummy operations,
  but they are all invoked.
2022-12-06 20:21:05 -05:00
2a9039ac67 experiment: Can't put code in declare sections :-) 2022-12-06 12:10:18 -05:00
78f3975d54 chore: pnpm init and add TypeScript 2022-12-02 09:15:25 -05:00
215a36a847 Initial commit 2022-12-02 14:04:53 +00:00