refactor(frontend): replace TaskDetails result record any types with typed models-#1402#1989
Open
Rakshak05 wants to merge 1 commit into
Open
refactor(frontend): replace TaskDetails result record any types with typed models-#1402#1989Rakshak05 wants to merge 1 commit into
Rakshak05 wants to merge 1 commit into
Conversation
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.
Description
This PR replaces broad
Record<string, any>,any[], and dynamicanyindex signatures with explicit interfaces orunknown-safe record types in theTaskDetailscomponent.Specifically, it implements the following modifications in
TaskDetails.tsx:inputs?: Record<string, any>withRecord<string, unknown>in theTaskinterface.metadata?: Record<string, any>withRecord<string, unknown>in theFindinginterface.EvidenceRecordandAssetServiceRecordfrom../apifor theevidencefield inFindingand theservicesfield inAssetSummaryEntryrespectively.references?: Array<Record<string, any>>withArray<Record<string, unknown>>in theFindinginterface.structuredresults object structure inTaskResultto definefindings?: Finding[]andtotal_count?: numberalongsiderows?: Array<Record<string, unknown>>.row: anymapper typing withrow: Record<string, unknown>in thetableRowsrendering paths.Related Issues
Closes #1402
Type of Change
How Has This Been Tested?
We verified these changes locally using TypeScript typechecking to ensure zero compiler issues are introduced:
npm run typecheckinsidefrontend/directory, which successfully completed compilation with zero errors.Checklist