-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
fix and improve types #106
base: main
Are you sure you want to change the base?
Conversation
I got a bunch of claim parsing typed which is nice. On the downside: I'm not sure how much I like the simplify methods as they are very dependent on the input and their options. Especially with types its simpler to pick the exact type you want and simplify exactly for your needs rather than simplifying with some options while loosing typings. I would consider publishing the parse_claim methods and deprecating the simplify claim related methods. |
also remove old unused ignores
reduce package size and only include whats needed
Also removes lint definitions that are exactly as the config.
6ad2795
to
5b9e26e
Compare
This is horrible to review… Maybe I should split this up into multiple Pull Requests which can be reviewed and accepted on their own. I keep this one open and rebase it on top of the current main branch as a "progress" indication and provide Pull Requests for parts. Then I'll wait with more changes until they are merged to prevent a huge clogged up PR like this one. Does that sound good to you @maxlath ? |
yes, more atomic PRs would be welcome indeed 😅 |
Conflicts: package.json scripts/update_dist tests/cirrus_search.ts tests/general.ts tests/get_entities.ts tests/get_entities_from_sitelinks.ts tests/get_entity_revision.ts tests/get_many_entities.ts tests/get_reverse_claims.ts tests/get_revisions.ts tests/helpers.ts tests/parse.ts tests/search_entities.ts tests/simplify_claims.ts tests/simplify_entity.ts tests/simplify_forms.ts tests/simplify_qualifiers.ts tests/simplify_senses.ts tests/simplify_sitelinks.ts tests/simplify_sparql_results.ts tests/sitelinks_helpers.ts tsconfig.json
@EdJoPaTo can we close this PR now that it was taken over in other PRs? |
There are still some things left which are not added in their own PR… I scrolled over this PR and found these:
|
This touched a lot of things again. I enabled some more tsconfig settings and removed some //@ts-nocheck. The only one left is the simplify_claims test one which seems especially fun to get rid of in the future. I also moved time related stuff into
wikibase_time.ts
.@mshd When you have time to review this one it would be nice :)