feat(ivy): require 'token' for ngInjectableDef (#30855)
The compiler generates a 'token' field when it emits an ngInjectableDef, but this field was not required by defineInjectable or the InjectableDef interface, nor was it added by InjectionToken. This commit makes 'token' required and adds it where missing. PR Close #30855
This commit is contained in:

committed by
Andrew Kushnir

parent
b0866769b0
commit
a4b4f35533
2
tools/public_api_guard/core/core.d.ts
vendored
2
tools/public_api_guard/core/core.d.ts
vendored
@ -778,6 +778,7 @@ export declare const ɵɵdefineDirective: <T>(directiveDefinition: {
|
||||
}) => never;
|
||||
|
||||
export declare function ɵɵdefineInjectable<T>(opts: {
|
||||
token: unknown;
|
||||
providedIn?: Type<any> | 'root' | 'any' | null;
|
||||
factory: () => T;
|
||||
}): never;
|
||||
@ -869,6 +870,7 @@ export declare function ɵɵinject<T>(token: Type<T> | InjectionToken<T>, flags?
|
||||
export interface ɵɵInjectableDef<T> {
|
||||
factory: () => T;
|
||||
providedIn: InjectorType<any> | 'root' | 'any' | null;
|
||||
token: unknown;
|
||||
value: T | undefined;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user