docs: fix some typos in comments and strings

Couple of typos fixed:
- occuring -> occurring
- imlement -> implement
- idenitifer -> identifer
etc...

Closes #5943
This commit is contained in:
flyyang 2015-12-16 15:47:48 +08:00 committed by Pengfei Yang
parent 2a2f9a9a19
commit 9276dad42c
23 changed files with 29 additions and 29 deletions

View File

@ -14,7 +14,7 @@ export const VALID = "VALID";
export const INVALID = "INVALID";
/**
* Indicates that a Control is pending, i.e. that async validation is occuring and
* Indicates that a Control is pending, i.e. that async validation is occurring and
* errors are not yet available for the input value.
*/
export const PENDING = "PENDING";

View File

@ -52,7 +52,7 @@ import {
}
* encapsultion: Styles defined within ShadowDOM, apply only to
dom inside the ShadowDOM. Polymer uses one of two techniques to imlement
dom inside the ShadowDOM. Polymer uses one of two techniques to implement
this feature.
By default, rules are prefixed with the host element tag name

View File

@ -51,8 +51,8 @@ import {splitAtColon} from './util';
// Group 3 = "on-"
// Group 4 = "bindon-"
// Group 5 = the identifier after "bind-", "var-/#", or "on-"
// Group 6 = idenitifer inside [()]
// Group 7 = idenitifer inside []
// Group 6 = identifer inside [()]
// Group 7 = identifer inside []
// Group 8 = identifier inside ()
var BIND_NAME_REGEXP =
/^(?:(?:(?:(bind-)|(var-|#)|(on-)|(bindon-))(.+))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/g;

View File

@ -73,7 +73,7 @@ export function codeGenToString(expr: string): string {
if (IS_DART) {
return `'\${${expr}}'`;
} else {
// JS automatically convets to string...
// JS automatically converts to string...
return expr;
}
}

View File

@ -5,7 +5,7 @@ import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
import {PromiseCompleter, PromiseWrapper, Promise} from 'angular2/src/facade/async';
/**
* A mock implemenation of {@link XHR} that allows outgoing requests to be mocked
* A mock implementation of {@link XHR} that allows outgoing requests to be mocked
* and responded to within a single test, without going to the network.
*/
export class MockXHR extends XHR {

View File

@ -161,7 +161,7 @@ export class Provider {
* expect(injector.get(String)).toEqual('Value: 3');
* ```
*
* Used in conjuction with dependencies.
* Used in conjunction with dependencies.
*/
useFactory: Function;
@ -211,7 +211,7 @@ export class Provider {
* Creates multiple providers matching the same token (a multi-provider).
*
* Multi-providers are used for creating pluggable service, where the system comes
* with some default providers, and the user can register additonal providers.
* with some default providers, and the user can register additional providers.
* The combination of the default providers and the additional providers will be
* used to drive the behavior of the system.
*

View File

@ -276,7 +276,7 @@ export class NgZone {
get hasPendingTimers(): boolean { return this._pendingTimeouts.length > 0; }
/**
* Whether there are any outstanding asychnronous tasks of any kind that are
* Whether there are any outstanding asynchronous tasks of any kind that are
* scheduled to run within Angular zone.
*
* Useful as a signal of UI stability. For example, when a test reaches a

View File

@ -26,7 +26,7 @@ export function evalModule(moduleSource: string, imports: string[][], args: any[
// using SystemJS, the loader might get confused by the presence of require,
// and attempt to load "+ modName +.js" !?!
// A simple string concat manages to prevent that, but that is one compiler
// optimaztion away from breaking again. Proceed with caution!
// optimization away from breaking again. Proceed with caution!
moduleSourceWithImports.push(`var ${modAlias} = require` + `('${modId}');`);
});
moduleSourceWithImports.push(moduleSource);

View File

@ -203,7 +203,7 @@ export function main() {
.toEqual([new CssRule('a', 'b {c}'), new CssRule('d', 'e')]);
});
it('should capture mutiple rules where some have no body', () => {
it('should capture multiple rules where some have no body', () => {
expect(captureRules('@import a ; b {c}'))
.toEqual([new CssRule('@import a', ''), new CssRule('b', 'c')]);
});

View File

@ -296,7 +296,7 @@ export function main() {
expect(template.styleUrls).toEqual(['http://some/module/test.css']);
}));
it('should normalize ViewEncapsulation.Emulated to ViewEncapsulation.None if there are no stlyes nor stylesheets',
it('should normalize ViewEncapsulation.Emulated to ViewEncapsulation.None if there are no styles nor stylesheets',
inject([TemplateNormalizer], (normalizer: TemplateNormalizer) => {
var template = normalizer.normalizeLoadedTemplate(
dirType, new CompileTemplateMetadata(

View File

@ -101,7 +101,7 @@ export function main() {
it('should throw when flush is called without any pending requests',
() => { expect(() => { xhr.flush(); }).toThrowError('No pending requests to flush'); });
it('should throw on unstatisfied expectations', () => {
it('should throw on unsatisfied expectations', () => {
xhr.expect('/foo', 'bar');
xhr.when('/bar', 'foo');
xhr.get('/bar');

View File

@ -33,7 +33,7 @@ export function main() {
describe("PlatformRef", () => {
describe("asyncApplication", () => {
it("should merge syncronous and asyncronous providers",
it("should merge synchronous and asynchronous providers",
inject([AsyncTestCompleter, Injector], (async, injector) => {
let ref = new PlatformRef_(injector, null);
let ASYNC_PROVIDERS = [new Provider(Foo, {useValue: new Foo()})];

View File

@ -1332,7 +1332,7 @@ export function main() {
expect(d.a).toEqual(2);
});
// TODO: enable after chaning dart infrastructure for generating tests
// TODO: enable after chaining dart infrastructure for generating tests
// it('should throw when trying to assign to a local', () => {
// expect(() => {
// _createChangeDetector('(event)="$event=1"', d, null)

View File

@ -160,7 +160,7 @@ export function main() {
expect(reflector.parameters(TestObj)).toEqual([[1], [2]]);
});
it("should return an empty list when no paramters field in the stored type info", () => {
it("should return an empty list when no parameters field in the stored type info", () => {
reflector.registerType(TestObj, new ReflectionInfo());
expect(reflector.parameters(TestObj)).toEqual([]);
});

View File

@ -108,13 +108,13 @@ export function main() {
});
it('should ensure that last possition is function', () => {
it('should ensure that last position is function', () => {
expect(() => {Class({constructor: []})})
.toThrowError(
"Last position of Class method array must be Function in key constructor was 'undefined'");
});
it('should ensure that annotation count matches paramaters count', () => {
it('should ensure that annotation count matches parameters count', () => {
expect(() => {Class({constructor: [String, function MyType() {}]})})
.toThrowError(
"Number of annotations (1) does not match number of arguments (0) in the function: MyType");

View File

@ -80,7 +80,7 @@ export function main() {
expect(StringWrapper.stripLeft(input, "#")).toEqual(expectedOutput);
});
it('should not alter the provided input if the first charater does not match the provided input',
it('should not alter the provided input if the first character does not match the provided input',
() => {
var input = "+angular2 is amazing";
expect(StringWrapper.stripLeft(input, "*")).toEqual(input);
@ -100,7 +100,7 @@ export function main() {
expect(StringWrapper.stripRight(input, "!")).toEqual(expectedOutput);
});
it('should not alter the provided input if the first charater does not match the provided input',
it('should not alter the provided input if the first character does not match the provided input',
() => {
var input = "angular2 is amazing+";

View File

@ -55,7 +55,7 @@ export function main() {
expect(view.directives).toEqual([SomeDirective]);
});
it('should allow overriding an overriden @View', () => {
it('should allow overriding an overridden @View', () => {
viewResolver.setView(SomeComponent, new ViewMetadata({template: 'overridden template'}));
viewResolver.setInlineTemplate(SomeComponent, 'overridden template x 2');
var view = viewResolver.resolve(SomeComponent);
@ -79,7 +79,7 @@ export function main() {
expect(view.directives[0]).toBe(SomeOtherDirective);
});
it('should allow overriding a directive from an overriden @View', () => {
it('should allow overriding a directive from an overridden @View', () => {
viewResolver.setView(SomeComponent, new ViewMetadata({directives: [SomeOtherDirective]}));
viewResolver.overrideViewDirective(SomeComponent, SomeOtherDirective, SomeComponent);
var view = viewResolver.resolve(SomeComponent);

View File

@ -239,7 +239,7 @@ export function main() {
scope.dataB = 'SAVKIN';
scope.event('WORKS');
// Should not update becaus [model-a] is uni directional
// Should not update because [model-a] is uni directional
scope.dataA = 'VICTOR';
}
})

View File

@ -22,7 +22,7 @@ import {isPresent} from 'angular2/src/facade/lang';
encapsulation: ViewEncapsulation.None,
})
export class MdButton {
/** Whether a mousedown has occured on this element in the last 100ms. */
/** Whether a mousedown has occurred on this element in the last 100ms. */
isMouseDown: boolean = false;
/** Whether the button has focus from the keyboard (not the mouse). Used for class binding. */

View File

@ -19,7 +19,7 @@ import {Math} from 'angular2/src/facade/math';
// TODO(jelbourn): Re-layout on window resize / media change (debounced).
// TODO(jelbourn): gridTileHeader and gridTileFooter.
/** Row hieght mode options. Use a static class b/c TypeScript enums are strictly number-based. */
/** Row height mode options. Use a static class b/c TypeScript enums are strictly number-based. */
class RowHeightMode {
static FIT = 'fit';
static FIXED = 'fixed';
@ -128,7 +128,7 @@ export class MdGridList implements AfterContentChecked {
getBaseTileSize(sizePercent: number, gutterFraction: number): string {
// Take the base size percent (as would be if evenly dividing the size between cells),
// and then subtracting the size of one gutter. However, since there are no gutters on the
// edges, each tile only uses a fration (gutterShare = numGutters / numCells) of the gutter
// edges, each tile only uses a fraction (gutterShare = numGutters / numCells) of the gutter
// size. (Imagine having one gutter per tile, and then breaking up the extra gutter on the
// edge evenly among the cells).
return `(${sizePercent}% - ( ${this.gutterSize} * ${gutterFraction} ))`;

View File

@ -13,7 +13,7 @@ export class MdRadioDispatcher {
this.listeners_ = [];
}
/** Notify other nadio buttons that selection for the given name has been set. */
/** Notify other radio buttons that selection for the given name has been set. */
notify(name: string) {
this.listeners_.forEach(listener => listener(name));
}

View File

@ -111,7 +111,7 @@ export class PerflogMetric extends Metric {
_endPlainMeasureAndMeasureForceGc(restartMeasure: boolean) {
return this._endMeasure(true).then((measureValues) => {
// disable frame capture for measurments during forced gc
// disable frame capture for measurements during forced gc
var originalFrameCaptureValue = this._captureFrames;
this._captureFrames = false;
return this._driverExtension.gc()

View File

@ -103,7 +103,7 @@ export class ChromeDriverExtension extends WebDriverExtension {
// 2nd choice: BenchmarkInstrumentation::DisplayRenderingStats - available on systems with
// new surfaces framework (not broadly enabled yet)
// 3rd choice: BenchmarkInstrumentation::ImplThreadRenderingStats - fallback event that is
// allways available if something is rendered
// always available if something is rendered
var frameCount = event['args']['data']['frame_count'];
if (frameCount > 1) {
throw new BaseException('multi-frame render stats not supported');