Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ const longerArray = longest([1, 2], [1, 2, 3]);
const longerString = longest("alice", "bob");
// Error! Numbers don't have a 'length' property
const notOK = longest(10, 100);
// Error! An array of numbers and a string can't be compared
const alsoNotOK = longest([1, 2], 'alice');
```

There are a few interesting things to note in this example.
Expand Down Expand Up @@ -887,3 +889,4 @@ const f3 = function (): void {
For more on `void` please refer to these other documentation entries:

- [FAQ - "Why are functions returning non-void assignable to function returning void?"](https://github.com/Microsoft/TypeScript/wiki/FAQ#why-are-functions-returning-non-void-assignable-to-function-returning-void)