refactor(core): replace public any types with unknown#21249
Open
AI-DEV-BOT wants to merge 1 commit into
Open
Conversation
16285e5 to
ee9e0d8
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 #18570.
Summary
TODO: fix in v11publicanytypes in core type definitions withunknownorRecord<string, unknown>.isInstanceOfaroundunknowninputs while keeping the existing invalid-constructor guard behavior.Errorassertions in aggregate error handling after the stricter type guard narrowing.Validation
yarn oxfmt packages/core/src/types/error.ts packages/core/src/types/misc.ts packages/core/src/types/samplingcontext.ts packages/core/src/types/stackframe.ts packages/core/src/types/user.ts packages/core/src/utils/is.ts packages/core/src/utils/aggregate-errors.ts --checkyarn workspace @sentry/core build:types:coreyarn workspace @sentry/core test test/lib/utils/is.test.tsOXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint <changed files> --type-awaregit diff --checkNote:
yarn workspace @sentry/core lintdoes not run directly in this Windows shell because the script uses Unix-style env assignment. Running the equivalent rootoxlint .locally reports many unrelated type-aware errors on Windows, so I used the targeted lint above plus CI feedback.