diff --git a/code/tips/nominalTyping.ts b/code/tips/nominalTyping.ts index 6e565e901..df12ed2e5 100644 --- a/code/tips/nominalTyping.ts +++ b/code/tips/nominalTyping.ts @@ -9,7 +9,7 @@ namespace Literal { type FooId = Id<'foo'>; type BarId = Id<'bar'>; - /** Optional: contructors functions */ + /** Optional: constructors functions */ const createFoo = (value: string): FooId => ({ type: 'foo', value }); const createBar = (value: string): BarId => ({ type: 'bar', value }); diff --git a/code/types/freshness/index-signatures.ts b/code/types/freshness/index-signatures.ts index 528eb31ff..9902fc432 100644 --- a/code/types/freshness/index-signatures.ts +++ b/code/types/freshness/index-signatures.ts @@ -115,7 +115,7 @@ module mustConform2 { module dual { interface ArrStr { - [key: string]: string | number; // Must accomodate all members + [key: string]: string | number; // Must accommodate all members [index: number]: string; // Can be a subset of string indexer diff --git a/code/types/type-compatibility.ts b/code/types/type-compatibility.ts index a445bc201..caf358623 100644 --- a/code/types/type-compatibility.ts +++ b/code/types/type-compatibility.ts @@ -19,7 +19,7 @@ export namespace FunctionArgsCount { } export namespace FunctionReturnCo { - /** Type Heirarchy */ + /** Type Hierarchy */ interface Point2D { x: number; y: number; } interface Point3D { x: number; y: number; z: number; } @@ -42,7 +42,7 @@ export namespace FunctionRest { } export namespace FunctionArgsBi { - /** Type Heirarchy */ + /** Type Hierarchy */ interface Point2D { x: number; y: number; } interface Point3D { x: number; y: number; z: number; } @@ -76,7 +76,7 @@ namespace NominalClassMemebers { export namespace invariance { - /** Heirarchy */ + /** Hierarchy */ class Animal { constructor(public name: string){} } class Cat extends Animal { meow() { } } diff --git a/docs/jsx/others.md b/docs/jsx/others.md index f3664a10c..ce481ceb0 100644 --- a/docs/jsx/others.md +++ b/docs/jsx/others.md @@ -51,7 +51,7 @@ import {jsxFactory} from "jsxFactory"; var div =
Hello JSX!
``` -With `--jsx react` this file will emit to use the factory specfied in the jsx pragma: +With `--jsx react` this file will emit to use the factory specified in the jsx pragma: ```js "use strict"; var jsxFactory_1 = require("jsxFactory"); diff --git a/docs/tips/nominalTyping.md b/docs/tips/nominalTyping.md index a7a0e3006..0a605fe09 100644 --- a/docs/tips/nominalTyping.md +++ b/docs/tips/nominalTyping.md @@ -32,7 +32,7 @@ foo = foo; // Okay * Advantages - No need for any type assertions * Disadvantage - - The structure `{type,value}` might not be desireable and need server serialization support + - The structure `{type,value}` might not be desirable and need server serialization support ## Using Enums [Enums in TypeScript](../enums.md) offer a certain level of nominal typing. Two enum types aren't equal if they differ by name. We can use this fact to provide nominal typing for types that are otherwise structurally compatible. diff --git a/docs/types/advanced.md b/docs/types/advanced.md index 6a02ae045..509c81232 100644 --- a/docs/types/advanced.md +++ b/docs/types/advanced.md @@ -5,7 +5,7 @@ # Functions ## Optional -The `?` annotation can be used before a function argument or member of an interface to denote that a member is optional. That is to say that you can provide it if you want (and it will be type checked), but if it is ommited its *okay*. This is shown in the following example: +The `?` annotation can be used before a function argument or member of an interface to denote that a member is optional. That is to say that you can provide it if you want (and it will be type checked), but if it is omitted its *okay*. This is shown in the following example: ## Specialized Parameters diff --git a/docs/types/never.md b/docs/types/never.md index 220a090db..c226eb684 100644 --- a/docs/types/never.md +++ b/docs/types/never.md @@ -74,7 +74,7 @@ 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 { @@ -82,7 +82,7 @@ function failDeclaration(message: string): never { } ``` -Key reason is backword compatability with real world JavaScript code: +Key reason is backward compatibility with real world JavaScript code: ```ts class Base { @@ -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 inference is maintained for compatibility.