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
- Host: GitHub
- URL: https://github.com/unclechu/typescript-dependent-types-experiment
- Owner: unclechu
- Created: 2021-02-07T12:14:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-11T14:40:24.000Z (over 5 years ago)
- Last Synced: 2024-12-27T22:21:32.304Z (over 1 year ago)
- Language: TypeScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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