Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Metadata typing #136

Open
ugurakin1 opened this issue Aug 18, 2024 · 1 comment
Open

[Enhancement] Metadata typing #136

ugurakin1 opened this issue Aug 18, 2024 · 1 comment

Comments

@ugurakin1
Copy link
Contributor

ugurakin1 commented Aug 18, 2024

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?

@matinzd
Copy link
Owner

matinzd commented Aug 19, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants