-
Notifications
You must be signed in to change notification settings - Fork 13
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
[job-components, scripts, terafoundation, teraslice-cli, teraslice-client-js, teraslice-messaging, utils, xlucene-parser] fix implicit any index typescript errors #3789
Conversation
766e773
to
4a1ac09
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
1c8b870
to
cbae5fc
Compare
/** | ||
* Verify that k is a key of object O | ||
*/ | ||
export function isKey<T extends object>(O: T, k: PropertyKey): k is keyof T { | ||
return k in O; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the getKeys
function used in earlier commits in favor of isKey
. getKeys
used type assertion, so could be unsafe. isKey
just returns a boolean and narrows the type for us.
bump: (patch) [email protected], [email protected] bump: (patch) [email protected], @terascope/[email protected] bump: (patch) @terascope/[email protected], @terascope/[email protected] bump: (patch) @terascope/[email protected], [email protected] bump: (patch) [email protected], [email protected]
4554ca8
to
eb74a0d
Compare
In typescript 5.5 the
suppressImplicitAnyIndexErrors
rule will be removed. This PR fixes all ignored errors of this type in the following packages in preparation for the move to version 5.5 or above:suppressImplicitAnyIndexErrors
is set to true in the tsconfig of all updated packages so we don't introduce any more of these errors before the rule is removed at the root level.Todo: bump packages
Packages that still have these errors:
ref: #3772