Skip to content

Cannot use providePlatformInitializer with platform #64277

@MillerSvt

Description

@MillerSvt

Which @angular/* package(s) are the source of the bug?

core

Is this a regression?

No

Description

When I try to provide platform initializer with providePlatformInitializer, I've got type error.

const platform = platformBrowser([
    providePlatformInitializer(() => {}),
]);

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

TS2322: Type EnvironmentProviders is not assignable to type StaticProvider

Please provide the environment you discovered this bug in (run ng version)


Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreIssues related to the framework runtime

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions