You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Output formats may be enabled or disabled using the output argument on worker.recognize. However, the types are currently not intelligent enough to figure out whether an output format is enabled or disabled.
For example, in the code below, img should have type string, however it instead has type string | null.
This is not a huge deal, as the types can be edited to either (1) hard-code the fact that img is non-null or (2) add a check in code for img being non-null, however both of these fixes are sub-optimal. Ideally, type inference would work automatically, and the type of img could be automatically inferred based on the input arguments.
The text was updated successfully, but these errors were encountered:
Output formats may be enabled or disabled using the
output
argument onworker.recognize
. However, the types are currently not intelligent enough to figure out whether an output format is enabled or disabled.For example, in the code below,
img
should have typestring
, however it instead has typestring | null
.This is not a huge deal, as the types can be edited to either (1) hard-code the fact that
img
is non-null or (2) add a check in code forimg
being non-null, however both of these fixes are sub-optimal. Ideally, type inference would work automatically, and the type ofimg
could be automatically inferred based on the input arguments.The text was updated successfully, but these errors were encountered: