Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pages/Type Inference.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ This is known as "contextual typing". Contextual typing occurs when the type of

```ts
window.onmousedown = function(mouseEvent) {
console.log(mouseEvent.button); //<- Error
console.log(mouseEvent.clickTime); //<- Error
};
```

Expand All @@ -63,7 +63,7 @@ Had we written the above example:

```ts
window.onmousedown = function(mouseEvent: any) {
console.log(mouseEvent.button); //<- Now, no error is given
console.log(mouseEvent.clickTime); //<- Now, no error is given
};
```

Expand Down