Skip to content

Commit

Permalink
Update Type Inference.md (#2936)
Browse files Browse the repository at this point in the history
  • Loading branch information
sivaprasadev authored Sep 6, 2023
1 parent 7e580ab commit ac040af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/documentation/copy/en/reference/Type Inference.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ let zoo = [new Rhino(), new Elephant(), new Snake()];
```

Ideally, we may want `zoo` to be inferred as an `Animal[]`, but because there is no object that is strictly of type `Animal` in the array, we make no inference about the array element type.
To correct this, instead explicitly provide the type when no one type is a super type of all other candidates:
To correct this, explicitly provide the type when no one type is a super type of all other candidates:

```ts twoslash
// @strict: false
Expand Down

0 comments on commit ac040af

Please sign in to comment.