Fix TypeScript interface and Python example in README#45
Open
umutcakirai wants to merge 1 commit into
Open
Conversation
Three documentation inaccuracies, all independent of each other. 1. `media_id`, `image` and `gif_url` were typed `string | null`, but no record has a null in any of them (0/1324 each) and the JSON Schema declares all three as required, non-nullable strings — `image` and `gif_url` even carry path patterns. The optional type pushed needless null-handling onto every consumer. Narrowed to `string`. 2. `instruction_steps` was missing from the interface entirely, even though every record carries it and the field table documents it. Added, typed `string[]` per language. 3. The Python example stopped at Hindi, skipping Polish and Korean; the JavaScript example right below it lists both. Added the two lines. Docs only — no data or schema changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three documentation inaccuracies in the README, all independent. Docs only — no data or schema changes.
1.
media_id/image/gif_urlwere typedstring | nullNo record has a null in any of them, and the JSON Schema declares all three required, non-nullable strings (
imageandgif_urleven carry path patterns):media_idstring, requiredimagestring, requiredgif_urlstring, requiredThe README's own field table already calls them
string. The optional type only pushed needless null-handling onto consumers. Narrowed tostring.2.
instruction_stepswas missing from the interfaceEvery record carries it (1324/1324) and the field table documents it, but the TypeScript type omitted it, so
data[0].instruction_stepsfailed to typecheck. Added asstring[]per language.3. The Python example skipped Polish and Korean
It stopped at Hindi while the JavaScript example immediately below lists all nine. Added the two missing lines.