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

Several typing issues found in the client #526

Open
vladfrangu opened this issue Mar 5, 2024 · 0 comments
Open

Several typing issues found in the client #526

vladfrangu opened this issue Mar 5, 2024 · 0 comments
Labels
bug Something isn't working.

Comments

@vladfrangu
Copy link
Member

vladfrangu commented Mar 5, 2024

While rewriting the tests for apify-cli, I've encountered several issues with the types for ActorVersion (and I am partly to blame):

  • enums are not exported but are used in concrete types (this is very bad as we don't provide string fallbacks, and thus people require casts)
    • solutions: either export the enum and use it, reference the types as imported from @apify/consts, or move to raw strings only
  • ActorVersionSourceFile seems to be missing the folder boolean (this type is used in ActorVersionSourceFiles, and seems to signal a folder of files)
  • keyValueStore(store.id).setRecord doesn't allow buffers
  • version(version).update has a wrong type (also reported https://apify.slack.com/archives/C0L33UM7Z/p1709550430797429)
  • builds lack newer fields, like buildNumber, build.stats?.computeUnits and build.stats?.imageSizeBytes being concretely typed
@vladfrangu vladfrangu added the bug Something isn't working. label Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working.
Projects
None yet
Development

No branches or pull requests

1 participant