react-native-health-connect
react-native-health-connect copied to clipboard
[Enhancement] Metadata typing
Health Connect docs indicate for ExerciseSessionRecords, metadata field is @NonNull but we type metadata to optional for every record (code):
export interface BaseRecord {
metadata?: Metadata;
}
Do we do this because some record types don't include metadata? Is there a way we can correct it?
Because I am using the base record both for inserting and result data that it is optional by default. When you are trying to insert a record metadata is optional but after the data insertion the metadata field will be populated. I need to use a separate base interface for results and inserts.
You can fix it and open a pull request if you want have some time.