diff --git a/goldens/public-api/common/index.api.md b/goldens/public-api/common/index.api.md index 0c4103c9880..76d203e98e2 100644 --- a/goldens/public-api/common/index.api.md +++ b/goldens/public-api/common/index.api.md @@ -1042,7 +1042,7 @@ export abstract class ViewportScroller { abstract setHistoryScrollRestoration(scrollRestoration: 'auto' | 'manual'): void; abstract setOffset(offset: [number, number] | (() => [number, number])): void; // (undocumented) - static ɵprov: unknown; + static ɵprov: i0.ɵɵInjectableDeclaration; } // @public @deprecated diff --git a/goldens/public-api/core/global_utils.api.md b/goldens/public-api/core/global_utils.api.md index 7d1affb8898..747f0975530 100644 --- a/goldens/public-api/core/global_utils.api.md +++ b/goldens/public-api/core/global_utils.api.md @@ -4,6 +4,8 @@ ```ts +import { ɵɵInjectableDeclaration } from '@angular/core'; + // @public export function applyChanges(component: {}): void; diff --git a/goldens/public-api/core/index.api.md b/goldens/public-api/core/index.api.md index 1d9ec32f7d3..019619b0f28 100644 --- a/goldens/public-api/core/index.api.md +++ b/goldens/public-api/core/index.api.md @@ -4,6 +4,7 @@ ```ts +import * as _angular_core from '@angular/core'; import { Observable } from 'rxjs'; import { Subject } from 'rxjs'; import { Subscription } from 'rxjs'; @@ -989,7 +990,7 @@ export abstract class Injector { // (undocumented) static THROW_IF_NOT_FOUND: {}; // (undocumented) - static ɵprov: unknown; + static ɵprov: _angular_core.ɵɵInjectableDeclaration; } // @public @@ -1118,7 +1119,7 @@ export class IterableDiffers { // (undocumented) find(iterable: any): IterableDifferFactory; // (undocumented) - static ɵprov: unknown; + static ɵprov: _angular_core.ɵɵInjectableDeclaration; } // @public @@ -1160,7 +1161,7 @@ export class KeyValueDiffers { // (undocumented) find(kv: any): KeyValueDifferFactory; // (undocumented) - static ɵprov: unknown; + static ɵprov: _angular_core.ɵɵInjectableDeclaration; } // @public @@ -1417,7 +1418,7 @@ export class PendingTasks { add(): () => void; run(fn: () => Promise): void; // (undocumented) - static ɵprov: unknown; + static ɵprov: _angular_core.ɵɵInjectableDeclaration; } // @public @@ -1757,7 +1758,7 @@ export abstract class Sanitizer { // (undocumented) abstract sanitize(context: SecurityContext, value: {} | string | null): string | null; // (undocumented) - static ɵprov: unknown; + static ɵprov: _angular_core.ɵɵInjectableDeclaration; } // @public @@ -1918,7 +1919,7 @@ export class TransferState { set(key: StateKey, value: T): void; toJson(): string; // (undocumented) - static ɵprov: unknown; + static ɵprov: _angular_core.ɵɵInjectableDeclaration; } // @public diff --git a/goldens/public-api/core/rxjs-interop/index.api.md b/goldens/public-api/core/rxjs-interop/index.api.md index 9ee0966adc9..d3f9a602b1c 100644 --- a/goldens/public-api/core/rxjs-interop/index.api.md +++ b/goldens/public-api/core/rxjs-interop/index.api.md @@ -4,6 +4,7 @@ ```ts +import * as _angular_core from '@angular/core'; import { MonoTypeOperatorFunction } from 'rxjs'; import { Observable } from 'rxjs'; import { Subscribable } from 'rxjs'; diff --git a/goldens/public-api/core/testing/index.api.md b/goldens/public-api/core/testing/index.api.md index 78bf8da36ef..c50373496f9 100644 --- a/goldens/public-api/core/testing/index.api.md +++ b/goldens/public-api/core/testing/index.api.md @@ -4,6 +4,7 @@ ```ts +import * as _angular_core from '@angular/core'; import { Observable } from 'rxjs'; import { Subject } from 'rxjs'; import { Subscription } from 'rxjs'; diff --git a/packages/core/src/di/interface/defs.ts b/packages/core/src/di/interface/defs.ts index 796fccbc352..8681668ed12 100644 --- a/packages/core/src/di/interface/defs.ts +++ b/packages/core/src/di/interface/defs.ts @@ -167,14 +167,14 @@ export interface InjectorTypeWithProviders { export function ɵɵdefineInjectable(opts: { token: unknown; providedIn?: Type | 'root' | 'platform' | 'any' | 'environment' | null; - factory: () => T; -}): unknown { + factory: (parent?: Type) => T; +}): ɵɵInjectableDeclaration { return { token: opts.token, providedIn: (opts.providedIn as any) || null, factory: opts.factory, value: undefined, - } as ɵɵInjectableDeclaration; + }; } /** diff --git a/packages/core/src/render3/definition.ts b/packages/core/src/render3/definition.ts index ab29c44219d..b90a8aa3bac 100644 --- a/packages/core/src/render3/definition.ts +++ b/packages/core/src/render3/definition.ts @@ -419,7 +419,7 @@ export function ɵɵdefineNgModule(def: { /** Unique ID for the module that is used with `getModuleFactory`. */ id?: string | null; -}): unknown { +}): NgModuleDef { return noSideEffects(() => { const res: NgModuleDef = { type: def.type, @@ -608,8 +608,8 @@ export function ɵɵdefinePipe(pipeDef: { * Whether the pipe is standalone. */ standalone?: boolean; -}): unknown { - return >{ +}): PipeDef { + return { type: pipeDef.type, name: pipeDef.name, factory: null, diff --git a/packages/core/src/render3/interfaces/public_definitions.ts b/packages/core/src/render3/interfaces/public_definitions.ts index 771facaf376..e7ef50f5ddf 100644 --- a/packages/core/src/render3/interfaces/public_definitions.ts +++ b/packages/core/src/render3/interfaces/public_definitions.ts @@ -6,6 +6,8 @@ * found in the LICENSE file at https://angular.dev/license */ +import {Type} from '../../interface/type'; + // This file contains types that will be published to npm in library typings files. // Formatting does horrible things to these declarations. @@ -78,7 +80,9 @@ export type ɵɵInjectorDeclaration = unknown; /** * @publicApi */ -export type ɵɵFactoryDeclaration = unknown; +export type ɵɵFactoryDeclaration = ( + parent?: Type, +) => T; /** * An object literal of this type is used to represent the metadata of a constructor dependency.