From 964a696fc2ca9b82bdaf60f257cc27ea21b349dc Mon Sep 17 00:00:00 2001 From: dario-piotrowicz Date: Fri, 17 Dec 2021 16:12:18 +0000 Subject: [PATCH] refactor: fix various typos across different packages (#44523) simply fix different unrelated typos present in various packages PR Close #44523 --- CHANGELOG.md | 2 +- packages/compiler-cli/src/ngtsc/typecheck/README.md | 2 +- .../src/ngtsc/typecheck/test/diagnostics_spec.ts | 2 +- packages/compiler/design/architecture.md | 2 +- packages/core/src/render3/i18n/i18n_parse.ts | 2 +- packages/core/src/render3/ng_module_ref.ts | 2 +- packages/core/test/acceptance/directive_spec.ts | 4 ++-- packages/docs/web_workers/web_workers.md | 6 +++--- packages/localize/schematics/ng-add/schema.d.ts | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0723eaaf260..401d9e11f9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3987,7 +3987,7 @@ import from `@angular/localize`. Previously it was `@angular/localize/run_time`. This should impact very few users and the user's that are impacted have a very easy upgrade path to switch to fetching the protractor_web_test_suite rule via the @bazel/protractor npm package. * **ivy:** This commit removes the public export of `hasBeenProcessed()`. -This was exported to be availble to the CLI integration but was never +This was exported to be available to the CLI integration but was never used. The change to the function signature is a breaking change in itself so we remove the function altogether to simplify and lower the public API surface going forward. diff --git a/packages/compiler-cli/src/ngtsc/typecheck/README.md b/packages/compiler-cli/src/ngtsc/typecheck/README.md index d5b5bc6bf27..1e32d15e2eb 100644 --- a/packages/compiler-cli/src/ngtsc/typecheck/README.md +++ b/packages/compiler-cli/src/ngtsc/typecheck/README.md @@ -502,7 +502,7 @@ export class MyDir { } ``` -In order to properly infer and check the type of this directve, the type constructor must include the generic bounds: +In order to properly infer and check the type of this directive, the type constructor must include the generic bounds: ```typescript declare function ctor1(inputs: {value?: T}): MyDir; diff --git a/packages/compiler-cli/src/ngtsc/typecheck/test/diagnostics_spec.ts b/packages/compiler-cli/src/ngtsc/typecheck/test/diagnostics_spec.ts index b474c447883..f95b5814e51 100644 --- a/packages/compiler-cli/src/ngtsc/typecheck/test/diagnostics_spec.ts +++ b/packages/compiler-cli/src/ngtsc/typecheck/test/diagnostics_spec.ts @@ -210,7 +210,7 @@ runInEachFileSystem(() => { }); it('does not repeat diagnostics for missing pipes in directive inputs', () => { - // The directive here is structured so that a type constructor is used, which resuts in each + // The directive here is structured so that a type constructor is used, which results in each // input binding being processed twice. This results in the 'uppercase' pipe being resolved // twice, and since it doesn't exist this operation will fail. The test is here to verify that // failing to resolve the pipe twice only produces a single diagnostic (no duplicates). diff --git a/packages/compiler/design/architecture.md b/packages/compiler/design/architecture.md index 5dfc2a13b14..a691091d362 100644 --- a/packages/compiler/design/architecture.md +++ b/packages/compiler/design/architecture.md @@ -117,7 +117,7 @@ the type declaration of the `ɵcmp` in the `.d.ts`. #### TypeScript architecture -The overall architecure of TypeScript is: +The overall architecture of TypeScript is: |------------| |----------------------------------> | TypeScript | diff --git a/packages/core/src/render3/i18n/i18n_parse.ts b/packages/core/src/render3/i18n/i18n_parse.ts index 16edade3139..bd80c037824 100644 --- a/packages/core/src/render3/i18n/i18n_parse.ts +++ b/packages/core/src/render3/i18n/i18n_parse.ts @@ -141,7 +141,7 @@ export function i18nStartFirstCreatePass( } /** - * Allocate space in i18n Range add create OpCode instruction to crete a text or comment node. + * Allocate space in i18n Range add create OpCode instruction to create a text or comment node. * * @param tView Current `TView` needed to allocate space in i18n range. * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will be diff --git a/packages/core/src/render3/ng_module_ref.ts b/packages/core/src/render3/ng_module_ref.ts index 8f9efbc5e62..662f0961aee 100644 --- a/packages/core/src/render3/ng_module_ref.ts +++ b/packages/core/src/render3/ng_module_ref.ts @@ -71,7 +71,7 @@ export class NgModuleRef extends viewEngine_NgModuleRef implements Interna stringify(ngModuleType)) as R3Injector; // We need to resolve the injector types separately from the injector creation, because - // the module might be trying to use this ref in its contructor for DI which will cause a + // the module might be trying to use this ref in its constructor for DI which will cause a // circular error that will eventually error out, because the injector isn't created yet. this._r3Injector._resolveInjectorDefTypes(); this.instance = this.get(ngModuleType); diff --git a/packages/core/test/acceptance/directive_spec.ts b/packages/core/test/acceptance/directive_spec.ts index b2dce9f0241..c67d721b225 100644 --- a/packages/core/test/acceptance/directive_spec.ts +++ b/packages/core/test/acceptance/directive_spec.ts @@ -315,7 +315,7 @@ describe('directives', () => { @Directive({selector: '[test]'}) class MyDir { constructor() { - logs.push('MyDir.contructor'); + logs.push('MyDir.constructor'); } @Input('test') myInput = ''; @@ -339,7 +339,7 @@ describe('directives', () => { const fixture = TestBed.createComponent(MyComp); fixture.detectChanges(); - expect(logs).toEqual(['MyDir.contructor']); + expect(logs).toEqual(['MyDir.constructor']); }); }); diff --git a/packages/docs/web_workers/web_workers.md b/packages/docs/web_workers/web_workers.md index 17fb7eeac40..f2b2b41c126 100644 --- a/packages/docs/web_workers/web_workers.md +++ b/packages/docs/web_workers/web_workers.md @@ -367,13 +367,13 @@ platform([WORKER_APP_PLATFORM_PROVIDERS]) function initAppThread(zone: NgZone, bus: MyAwesomeMessageBus): void{ /** - * Here you can do any initilization work that requires the app providers to be initialized. + * Here you can do any initialization work that requires the app providers to be initialized. * At a minimum, you must attach your bus to the zone and setup a DOM adapter. * Depending on your environment you may choose to do more work here. */ } ``` -Notice how we use the `WORKER_RENDER_APPLICTION_COMMON` providers instead of the `WORKER_RENDER_APPLICATION` providers on the render thread. +Notice how we use the `WORKER_RENDER_APPLICATION_COMMON` providers instead of the `WORKER_RENDER_APPLICATION` providers on the render thread. This is because the `WORKER_RENDER_APPLICATION` providers include an application initializer that starts a new WebWorker/Isolate. The `WORKER_RENDER_APPLICATION_COMMON` providers make no assumption about where your application code lives. However, we now need to provide our own app initializer. At the very least this initializer needs to call `initializeGenericWorkerRenderer`. @@ -422,7 +422,7 @@ export class MyComponent { var arguments = [new FnArg(value, PRIMITIVE)]; var methodInfo = new UiArguments("awesomeMethod", arguments); - broker.runOnService(methodInfo, PRIMTIVE).then((result: string) => { + broker.runOnService(methodInfo, PRIMITIVE).then((result: string) => { // result will be equal to the return value of doCoolThing(value) that ran on the UI. }); } diff --git a/packages/localize/schematics/ng-add/schema.d.ts b/packages/localize/schematics/ng-add/schema.d.ts index a96090d97e1..62f8c5b72e8 100644 --- a/packages/localize/schematics/ng-add/schema.d.ts +++ b/packages/localize/schematics/ng-add/schema.d.ts @@ -14,7 +14,7 @@ export interface Schema { /** * Will this project use $localize at runtime? * - * If true then the dependency is included in the `dependencies` section of packge.json, rather + * If true then the dependency is included in the `dependencies` section of package.json, rather * than `devDependencies`. */ useAtRuntime?: boolean;