Skip to content
Open
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions docs/types/never.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ const failExpression = function(message: string) {
};
```

Of course you can fix it by an explict annotation:
Of course you can fix it by an explicit annotation:

```ts
function failDeclaration(message: string): never {
throw new Error(message);
}
```

Key reason is backword compatability with real world JavaScript code:
Key reason is backword compatibility with real world JavaScript code:

```ts
class Base {
Expand All @@ -100,7 +100,7 @@ class Derived extends Base {

If `Base.overrideMe` .

> Real world TypeScript can overcome this with `abstract` functions but this inferrence is maintained for compatability.
> Real world TypeScript can overcome this with `abstract` functions but this inferrence is maintained for compatibility.

<!--
PR: https://github.com/Microsoft/TypeScript/pull/8652
Expand Down
2 changes: 1 addition & 1 deletion docs/types/type-compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ status = num; // OKAY
num = status; // OKAY
```

* Enum values from different enum types are considered incompatible. This makes enums useable *nominally* (as opposed to structurally)
* Enum values from different enum types are considered incompatible. This makes enums usable *nominally* (as opposed to structurally)

```ts
enum Status { Ready, Waiting };
Expand Down