An open API service indexing awesome lists of open source software.

https://github.com/unclechu/typescript-dependent-types-experiment

An experiment of dependent types in TypeScript
https://github.com/unclechu/typescript-dependent-types-experiment

Last synced: 8 months ago
JSON representation

An experiment of dependent types in TypeScript

Awesome Lists containing this project

README

          

An experiment of dependent types in TypeScript.

**Spoiler:** they don’t work. TypeScript is not ready for production.

Make sure you have [Nix](https://nixos.org/nix/) installed in your system.

Run:

``` sh
./run.sh
```

## Thanks to

1. [Andrew @ponyloop](https://github.com/ponyloop)
who was brainstorming with me and giving good ideas

2. [@m-b-davis](https://github.com/m-b-davis) from
[TypeScript chat](https://app.element.io/#/room/#typescript:matrix.org/$161270868411548KHNMQ:gitter.im)
for fixing one of the problems
(inferring response type after a call of `dbQuery`)

3. [@jcalz](https://github.com/jcalz)
for his idea with `T[K]` hack on [Stack Overflow](https://stackoverflow.com/a/66127276)

## See also

A question on Stack Overflow:
https://stackoverflow.com/questions/66119146/typescript-how-to-make-generic-type-to-infer-inside-a-function