-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a4f9d51
commit 1d871c6
Showing
1 changed file
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
--- | ||
outline: [2, 3] | ||
--- | ||
|
||
# TypeScript | ||
|
||
Farfetched is going to provide first-class support of TypeScript types. It is written in TypeScript, and it has a lot of type-tests. However, TypeScript itself does not aim for [apply a sound or "provably correct" type system](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals#non-goals), instead it strikes a balance between correctness and productivity. So, we cannot guarantee that all the types are correct, but we are going to do our best to provide the best possible types. | ||
|
||
## Known issues | ||
|
||
TS itself has some limitations, and Farfetched is not an exception, we cannot fix this issues, but we can provide some workarounds. Here is a list of known issues: | ||
|
||
### `declareParams` | ||
|
||
It is recommended to use `type` instead of `interface` in `declareParams`, because `interface` can break the type inference in [some cases](https://github.com/igorkamyshev/farfetched/issues/266). The exhaustive reasons of the issue could be found in the [answer on StackOverflow](https://stackoverflow.com/questions/55814516/typescript-why-type-alias-satisfies-a-constraint-but-same-interface-doesnt). |