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
+1 -1
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";
+1 -1
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
@@ -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;
+1 -1
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;
}
}
+1 -1
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 {
+2 -2
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.
*
+1 -1
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
@@ -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);
@@ -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')]);
});
@@ -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(
@@ -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');
@@ -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()})];
@@ -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)
@@ -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([]);
});
@@ -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");
+2 -2
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+";
@@ -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);
@@ -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';
}
})