Plugin(s)
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.
Plugin(s)
Current problem
The
sourceproperty inGetBooleanResult,GetNumberResult,GetStringResult, andGetAllResultValueis 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
sourcenon-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 providesource), 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.