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

Adding type checking to the realm-app-importer #4688

Merged
merged 1 commit into from
Jun 30, 2022

Conversation

kraenhansen
Copy link
Member

What, How & Why?

This adds type checking to the response objects returned from calling the admin API in the realm-app-importer package.
This was needed after an upgrade of typescript and eslint on the kh/npm-workspaces branch. Making this a separate PR to ease review.

☑️ ToDos

  • 📝 Changelog entry
  • 📝 Compatibility label is updated or copied from previous entry
  • 🚦 Tests
  • 🔀 Executed flexible sync tests locally if modifying flexible sync
  • 📦 Updated internal package version in consuming package.jsons (if updating internal packages)
  • 📱 Check the React Native/other sample apps work if necessary
  • 📝 Public documentation PR created or is not necessary
  • 💥 Breaking label has been applied or is not necessary

@kraenhansen kraenhansen force-pushed the kh/typed-app-importer branch from 26e5669 to 9990a81 Compare June 29, 2022 17:58
Copy link
Contributor

@takameyer takameyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

const apps: App[] = await response.json();
const apps = await response.json();
if (!isAppsResponse(apps)) {
throw new Error("Expected a response with apps");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢 Maybe printing the invalid response would be helpful.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I can also handle this when I rebase this into my changes

@kraenhansen kraenhansen merged commit a6c17fe into master Jun 30, 2022
@kraenhansen kraenhansen deleted the kh/typed-app-importer branch June 30, 2022 06:21
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants