Skip to content

Commit

Permalink
Add TS known issue
Browse files Browse the repository at this point in the history
  • Loading branch information
igorkamyshev committed Aug 21, 2024
1 parent a4f9d51 commit 1d871c6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions apps/website/docs/statements/typescript.md
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).

0 comments on commit 1d871c6

Please sign in to comment.