Skip to content

PollingController.startPollingByNetworkClientId does not type-check the given options #3634

Open
@mcmire

Description

@mcmire

When calling startPollingByNetworkClientId in a controller that inherits from PollingController, it is possible to not pass any options or the wrong options, even if types are supplied for those options in that controller's _executePoll. Since startPollingByNetworkClientId is contained with PollingController, and PollingController has no awareness of what a subclass needs, all it can say is that the options are optional, and if they are supplied, they must be Json. The result of this is that if options are missing from startPollingByNetworkClientId, it can cause errors at runtime, which is not only undesirable because it goes against the purpose of using TypeScript, but also because it it is confusing to consumers.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions