Skip to content

feat(remote-config): make source non-optional in result types #980

Description

@robingenz

Plugin(s)

  • Remote Config

Current problem

The source property in GetBooleanResult, GetNumberResult, GetStringResult, and GetAllResultValue is declared as optional (source?: GetValueSource), even though it is always populated on Android, iOS, and (as of #979) Web. The optional type forces consumers to perform null checks they don't need at runtime.

Preferred solution

Make source non-optional (source: GetValueSource) in the four result types. This is a breaking TypeScript change (consumers constructing these result literals — e.g. test mocks — would need to provide source), so it is scheduled for v9.0.0.

Alternative options

No response

Additional context

Originally part of #979 but reverted to keep that PR non-breaking. Tracked here for v9.0.0.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions