diff --git a/packages/upgrade/src/common/src/angular1.ts b/packages/upgrade/src/common/src/angular1.ts index efe8d0bd59..9615a3c927 100644 --- a/packages/upgrade/src/common/src/angular1.ts +++ b/packages/upgrade/src/common/src/angular1.ts @@ -116,9 +116,7 @@ export interface ITranscludeFunction { // If one argument is provided, then it's assumed to be the cloneAttachFn. (cloneAttachFn?: ICloneAttachFunction): IAugmentedJQuery; } -export interface ICloneAttachFunction { - (clonedElement: IAugmentedJQuery, scope: IScope): any; -} +export interface ICloneAttachFunction { (clonedElement: IAugmentedJQuery, scope: IScope): any; } export type IAugmentedJQuery = Node[] & { on?: (name: string, fn: () => void) => void; data?: (name: string, value?: any) => any; diff --git a/packages/upgrade/src/common/test/helpers/common_test_helpers.ts b/packages/upgrade/src/common/test/helpers/common_test_helpers.ts index 209d4304bc..436f6261d9 100644 --- a/packages/upgrade/src/common/test/helpers/common_test_helpers.ts +++ b/packages/upgrade/src/common/test/helpers/common_test_helpers.ts @@ -124,7 +124,7 @@ export function createWithEachNg1VersionFn(setNg1: typeof setAngularJSGlobal) { delete win.angular; }); - methodsToPatch.forEach(method => win[method](function() { + methodsToPatch.forEach(method => win[method](function(this: unknown) { // Run the captured callbacks. (Async callbacks not supported.) methodCallbacks[method].forEach(cb => cb.call(this)); })); diff --git a/packages/upgrade/src/dynamic/src/upgrade_adapter.ts b/packages/upgrade/src/dynamic/src/upgrade_adapter.ts index ff35f0a1c2..4232b2690f 100644 --- a/packages/upgrade/src/dynamic/src/upgrade_adapter.ts +++ b/packages/upgrade/src/dynamic/src/upgrade_adapter.ts @@ -537,8 +537,8 @@ export class UpgradeAdapter { function(testabilityDelegate: ITestabilityService) { const originalWhenStable: Function = testabilityDelegate.whenStable; // Cannot use arrow function below because we need the context - const newWhenStable = function(callback: Function) { - originalWhenStable.call(this, function() { + const newWhenStable = function(this: unknown, callback: Function) { + originalWhenStable.call(this, function(this: unknown) { const ng2Testability: Testability = upgradeAdapter.moduleRef !.injector.get(Testability); if (ng2Testability.isStable()) { @@ -670,7 +670,7 @@ class ParentInjectorPromise { */ export class UpgradeAdapterRef { /* @internal */ - private _readyFn: ((upgradeAdapterRef?: UpgradeAdapterRef) => void)|null = null; + private _readyFn: ((upgradeAdapterRef: UpgradeAdapterRef) => void)|null = null; public ng1RootScope: IRootScopeService = null !; public ng1Injector: IInjectorService = null !;