Skip to content

chore: Typescript Cleanup- Part 1 of 1 for Errors status,tooltip,selectedtest#7249

Merged
JeevaniChinthala merged 4 commits intomainfrom
users/v-jeevanic/TypeScriptFeature
Feb 29, 2024
Merged

chore: Typescript Cleanup- Part 1 of 1 for Errors status,tooltip,selectedtest#7249
JeevaniChinthala merged 4 commits intomainfrom
users/v-jeevanic/TypeScriptFeature

Conversation

@JeevaniChinthala
Copy link
Copy Markdown
Contributor

@JeevaniChinthala JeevaniChinthala commented Feb 23, 2024

Details

As part of Typescript migration added/removed the error causing fields.

Motivation

TypeScript 5.0 has marked some options as deprecated. We can temporarily override these deprecations, but the documented plan is for the ability to override the flag to go away in TypeScript 5.5

Context
  1. tooltip
  • Error : No overload matches this call. Property 'tooltipId' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes
  • As per the history of commits it was present earlier and in one of the commits they removed.
  • Comment given was null strictness fixes for leaf files in assessment ,common,DetailsView ,reports,tests, view.
  • Considering this, removing the property.
  1. status
  • Error : Object literal may only specify known properties, and 'status' does not exist in type 'CardRuleResult'.
  • If we observe the usage of const createCardRuleResult -> status: string, createRuleResultWithoutNodes -> status: CardRuleResultStatus where ‘status’ has pre-defined values which will be passed to status property which is giving error.
  • Status holds some value, considering this, added the property.
  1. selectedtest
  • Error : { triggeredBy: TriggeredBy; source: TelemetryEventSource.DetailsView; selectedRequirement: string; selectedTest: string; }' is not assignable to type 'RequirementActionTelemetryData'.
  • For this property in given file it has been passed value of VisualizationType[test] and can see similar behavior of properties used in the same file.
  • Considering this, added the property.
  1. deps:props.deps
  • Error:
  • { deps: TargetChangeDialogDeps; prevTab: PersistedTabInfo; dialogContentTitle: string; subtitleAriaId: string; divId: string; leftButtonText: string; ... 8 more ...; rightButtonDataAutomationId: string; }' is not assignable to type 'ChangeAssessmentDialogProps'.
    Object literal may only specify known properties, and 'deps' does not exist in type 'ChangeAssessmentDialogProps'
  • Checked all the relevant files and did check in UI, compared with old UI with new change, they didn't used this property.

Pull request checklist

  • Addresses an existing issue: #(chore: Remove deprecated TypeScript options #6611)
  • Ran yarn fastpass
  • Added/updated relevant unit test(s) (and ran yarn test)
  • Verified code coverage for the changes made. Check coverage report at: <rootDir>/test-results/unit/coverage
  • PR title AND final merge commit title both start with a semantic tag (fix:, chore:, feat(feature-name):, refactor:). See CONTRIBUTING.md.
  • (UI changes only) Added screenshots/GIFs to description above
  • (UI changes only) Verified usability with NVDA/JAWS

@JeevaniChinthala JeevaniChinthala changed the title Typescript changes - Part 1 for Errors status,tooltip,selectedtest chore: Typescript Cleanup- Part 1 for Errors status,tooltip,selectedtest Feb 27, 2024
@v-viyada v-viyada marked this pull request as ready for review February 27, 2024 17:18
@v-viyada v-viyada requested a review from a team as a code owner February 27, 2024 17:18
Copy link
Copy Markdown
Contributor

@madalynrose madalynrose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JeevaniChinthala JeevaniChinthala changed the title chore: Typescript Cleanup- Part 1 for Errors status,tooltip,selectedtest chore: Typescript Cleanup- Part 1 of 1 for Errors status,tooltip,selectedtest Feb 29, 2024
@JeevaniChinthala JeevaniChinthala merged commit 4ae1417 into main Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants