This repository was archived by the owner on Oct 21, 2021. It is now read-only.
Commit f57709d
committed
Fix the typescript typings
- fix type for namedItem to be consistent with the flow types. The
generic type applies to the return type, not to the form
- add support for refining the return type based on the constructor
being passed as last argument, as done in flow types
- add testing of the typings, by running the typescript compiler on the
test.ts file and ensuring that it does not complain about types. The
refined return type is also now covered by this test.ts file.1 parent 98aeb95 commit f57709d
4 files changed
+200
-52
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
0 commit comments