add some todos

This commit is contained in:
Tom Elliott 2024-07-29 13:51:38 +12:00
parent f54acd6e8a
commit e641b139b8
2 changed files with 19 additions and 0 deletions

View File

@ -106,3 +106,11 @@ cat(readLines("tests/testthat/app/app.R"), sep = "\n")
ts_compile("tests/testthat/app/app.R", file = "")
```
## TODO
- [ ] Add support for more types
- [ ] Allow generic types (e.g., `<T>(x: T) => T`)
- [ ] Add support for conditional return types
e.g., `const sample = <T, N extends number>(x: T[], n: N) => N extends 1 ? T : T[]`

View File

@ -112,3 +112,14 @@ ts_compile("tests/testthat/app/app.R", file = "")
#> const fn_first = (x: string | string[]) => Promise<Character<1>)>;
#> const fn_mean = (x: number | number[]) => Promise<Numeric<1>)>;
```
## TODO
- [ ] Add support for more types
- [ ] Allow generic types (e.g., `<T>(x: T) => T`)
- [ ] Add support for conditional return types
e.g., `const sample = <T, N extends number>(x: T[], n: N) => N
extends 1 ? T : T[]`