Skip to content
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

improvement(devtools-view): enable noUncheckedIndexedAccess #23772

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

RishhiB
Copy link
Contributor

@RishhiB RishhiB commented Feb 4, 2025

  • enable noUncheckedIndexAccess
// Total: 5 errors in src/replayDocumentDeltaConnection.ts

// File: src/replayDocumentDeltaConnection.ts 
Line 135: error TS18048: 'currentOp' is possibly 'undefined'.
 const currentTimeStamp = currentOp.timestamp;
                            ~~~~~~~~~

Line 141: error TS18048: 'op' is possibly 'undefined'.
 if (op.timestamp === undefined) {
        ~~

Line 145: error TS18048: 'op' is possibly 'undefined'.
 const timeDiff = op.timestamp - currentTimeStamp;
                     ~~

Line 172: error TS2345: Argument of type '(ISequencedDocumentMessage | undefined)[]' is not assignable to parameter of type 'ISequencedDocumentMessage[]'.
 emitter(playbackOps);
          ~~~~~~~~~~~

Line 335: error TS2532: Object is possibly 'undefined'.
 done = controller.isDoneFetch(currentOp, messages[messages.length - 1].timestamp);
                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@github-actions github-actions bot added the base: main PRs targeted against main branch label Feb 4, 2025
@RishhiB RishhiB changed the title improvement(devtools-core): enable noUncheckedIndexedAccess improvement(devtools-view): enable noUncheckedIndexedAccess Feb 4, 2025
…namicComposedChart.tsx

Co-authored-by: Joshua Smithrud <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants