Repository navigation
Fix strict-mode errors in @transifex/api typings - #250
Open
pablotransifex wants to merge 1 commit into
Open
pablotransifex wants to merge 1 commit into
pablotransifex wants to merge 1 commit into
Conversation
pablotransifex
force-pushed
the
fix/api-type-declarations
branch
from
November 11, 2026 15:57
ce9ecdf to
741b2b7
Compare
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.
Fixes #249, fixes #232.
Two mistakes in
packages/api/src/transifexApi.d.tsbroke TypeScript projects that usestrictwithoutskipLibCheck:extra(AnyDict)(static and onCollection) declared a parameter namedAnyDictwith no type, which raises TS7006 undernoImplicitAny. It is nowextra(params: AnyDict).fetch(relationshipName, force)requiredforce, soorganization.fetch('projects'), as written in the README, raised TS2554.forceis now optional, matching the runtime default.Only the type declarations change; there is no runtime change.
Verification: I ran
tsc --strict(TypeScript 5.6) on a sample that callsorg.fetch('projects')and chains.extra(). On master it reports TS2554 and two TS7006 errors; with this change it passes.