Skip to content

Commit c41cc7b

Browse files
author
Orta
authored
Merge pull request microsoft#1103 from microsoft/minor_typoes
Adds a note about `strictFunctionTypes` to type compatibility
2 parents ed04aae + c99a410 commit c41cc7b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pages/Type Compatibility.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ listenEvent(EventType.Mouse, ((e: MouseEvent) => console.log(e.x + "," + e.y)) a
135135
listenEvent(EventType.Mouse, (e: number) => console.log(e));
136136
```
137137

138+
You can have TypeScript raise errors when this happens via the compiler flag `strictFunctionTypes`.
139+
138140
## Optional Parameters and Rest Parameters
139141

140142
When comparing functions for compatibility, optional and required parameters are interchangeable.

pages/release notes/TypeScript 3.1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ So the resulting type `PromiseCoordinate` ends up with the type `[Promise<number
1818

1919
# Properties declarations on functions
2020

21-
TypeScript 3.1 brings the ability to define properties on function declarations and `const`-declared functons, simply by assigning to properties on these functions in the same scope.
21+
TypeScript 3.1 brings the ability to define properties on function declarations and `const`-declared functions, simply by assigning to properties on these functions in the same scope.
2222
This allows us to write canonical JavaScript code without resorting to `namespace` hacks.
2323
For example:
2424

0 commit comments

Comments
 (0)