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
But when using this for /lemgram_count, this is invalid, as TypeScript believes data.ERROR could be a number (as if "ERROR" was a lemgram in a successful response).
It can easily be worked around, but I would suggest pushing the counts mapping down under a member called counts or so, to separate the dynamic data from the predictable members:
{
"counts": {
"katt..nn.1": 5
},
"time": 0.123
}
The text was updated successfully, but these errors were encountered:
/lemgram_count
returns a mapping of lemgram strings to counts. The data is on the top level of the response, besidetime
andERROR
.This is a little annoying to handle in TypeScript. For other API endpoints, the following code successfully identifies an error response:
But when using this for
/lemgram_count
, this is invalid, as TypeScript believesdata.ERROR
could be a number (as if "ERROR" was a lemgram in a successful response).It can easily be worked around, but I would suggest pushing the counts mapping down under a member called
counts
or so, to separate the dynamic data from the predictable members:The text was updated successfully, but these errors were encountered: