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

chore: TypeScript Cleanup 5.0 Part 4 for Errors - includeStepsText,featureFlagStoreData,deps,requirementState,outline, #7292

Merged
merged 9 commits into from
Apr 11, 2024

Conversation

JeevaniChinthala
Copy link
Contributor

@JeevaniChinthala JeevaniChinthala commented Apr 1, 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. includeStepsText={false}
  • Error: No overload matches this call.Type '{ needsReviewCardsViewData: CardsViewModel; needsReviewCardSelectionMessageCreator: CardSelectionMessageCreator; automatedChecksCardsViewData: CardsViewModel }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly & Readonly<...>'
  • Property 'includeStepsText' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly
  • In file src/DetailsView/components/default-test-view-container-provider.tsx getting error for includeStepsText. Added the property in reference file.
  1. requirementState={requirementState}
  • Error: Type '{ deps: AdhocTabStopsTestViewDeps; failureInstanceState: FailureInstanceState; requirementState: TabStopRequirementState; }' is not assignable to type 'IntrinsicAttributes & TabStopsFailedInstancePanelProps & { children?: ReactNode; }'.
  • Property 'requirementState' does not exist on type 'IntrinsicAttributes & TabStopsFailedInstancePanelProps & { children?: ReactNode; }'.
  • As per the previous commits, someone removed from the reference interface/type but didn't remove from actual usage.
  1. featureFlagStoreData={featureFlagStoreData}
  • Error: Type '{ deps: DetailsViewLeftNavDeps; featureFlagStoreData: FeatureFlagStoreData; pivotKey: DetailsViewPivotType; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly & Readonly<...>'.
  • Property 'featureFlagStoreData' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes
  • As per the previous commits, someone removed from the reference interface/type but didn't remove from actual usage.
  1. Deps
  • Error: Type '{ deps: ReportExportComponentDeps; isOpen: boolean; htmlFileName: string; jsonFileName: string; description: string; htmlExportData: string; jsonExportData: string; ... 9 more ...; exportResultsClickedTelemetry: (reportExportFormat: ReportExportFormat, selectedServiceKey: ReportExportServiceKey, event: MouseEvent<.....' is not assignable to type 'IntrinsicAttributes & ExportDialogProps & { children?: ReactNode; }'.
  • Property 'deps' does not exist on type 'IntrinsicAttributes & ExportDialogProps & { children?: ReactNode; }'.
  • As per the previous commits, someone removed from the reference interface/type but didn't remove from actual usage.
  1. outline: '3px dashed'
  • Error: Type '{ fontColor: string; background: string; text: string; fontWeight: string; fontSize: string; outline: string; }' is not assignable to type 'TextBoxConfig'.
  • Object literal featureFlagData={featureFlags}may only specify known properties, and 'outline' does not exist in type 'TextBoxConfig'.
  • As per the previous commits, someone removed from the reference interface/type but didn't remove from actual usage.
  1. featureFlagData={featureFlags}
  • Error: Type '{ deps: LaunchPanelHeaderDeps; popupWindow: Window; header: this; featureFlagData: FeatureFlagStoreData; }' is not assignable to type 'IntrinsicAttributes & HamburgerMenuButtonProps & { children?: ReactNode; }'.
  • Property 'featureFlagData' does not exist on type 'IntrinsicAttributes & HamburgerMenuButtonProps & { children?: ReactNode; }'.
  • As per the previous commits, someone removed from the reference interface/type but didn't remove from actual usage.
  1. isContextMenuVisible
  • Error: Argument of type '{ target: any; isContextMenuVisible: boolean; }' is not assignable to parameter of type 'LaunchPanelHeaderState | ((prevState: Readonly, props: Readonly) => LaunchPanelHeaderState | Pick<...>) | Pick<...>'.
  • Object literal may only specify known properties, and 'isContextMenuVisible' does not exist in type 'LaunchPanelHeaderState
  • As per the previous commits, someone removed from the reference interface/type but didn't remove from actual usage.
  1. featureFlagStoreData
  • Error: Property 'featureFlagStoreData' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes
  • As per the previous commits, someone removed from the reference interface/type but didn't remove from actual usage.
  1. deps:null
  • Error: Argument of type '{ id: string; header: JSX.Element; content: JSX.Element; headingLevel: number; deps: null; }' is not assignable to parameter of type 'ReportCollapsibleContainerProps'.
  • Object literal may only specify known properties, and 'deps' does not exist in type 'ReportCollapsibleContainerProps'.
  • As per the previous commits, someone removed from the reference interface/type but didn't remove from actual usage.
  1. testName: 'test-name'
  • Error: Type '{ key: string; testName: string; rules: string[]; testType: VisualizationType; }' is not assignable to type 'Readonly<Partial>'.
  • Object literal may only specify known properties, and 'testName' does not exist in type 'Readonly<Partial>'.
  1. openGettingStartedDialog
  • Error: Type '{ deps: LaunchPanelHeaderDeps; title: string; subtitle: string; openGettingStartedDialog: any; openFeedbackDialog: any; popupWindow: Window; featureFlags: FeatureFlagStoreData; openAdhocToolsPanel: () => void; dropdownClickHandler: DropdownClickHandler; }' is not assignable to type 'LaunchPanelHeaderProps'.
  • Object literal may only specify known properties, and 'openGettingStartedDialog' does not exist in type 'LaunchPanelHeaderProps'.
  • As per the previous commits, someone removed from the reference interface/type but didn't remove from actual usage.
  1. deps
  • Error: Type '{ deps: { collapsibleControl: (collapsibleControlProps: ReportCollapsibleContainerProps) => JSX.Element; }; failed: { url: string; numFailures: number; reportLocation: string; }[]; passed: { ...; }[]; unscannable: { ...; }[]; }' is not assignable to type 'SummaryScanResults'.
  • Object literal may only specify known properties, and 'deps' does not exist in type 'SummaryScanResults'.
  • As per the previous commits, someone removed from the reference interface/type but didn't remove from actual usage.

Pull request checklist

  • Addresses an existing issue: #0000
  • 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
  • [x ] 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

@v-viyada v-viyada changed the title chore: TypeScript Cleanup 2.0 Part 4 chore: TypeScript Cleanup 5.0 Part 4 Apr 2, 2024
@JeevaniChinthala JeevaniChinthala changed the title chore: TypeScript Cleanup 5.0 Part 4 chore: TypeScript Cleanup 5.0 Part 4 for Errors - includeStepsText,featureFlagStoreData,deps,requirementState,outline, Apr 3, 2024
@v-viyada v-viyada marked this pull request as ready for review April 5, 2024 16:18
@v-viyada v-viyada requested a review from a team as a code owner April 5, 2024 16:18
Copy link
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.

I have a couple questions/suggestions before I approve.

@@ -54,7 +54,6 @@ export class DefaultTestViewContainerProvider implements TestViewContainerProvid
instancesSection={FailedInstancesSection}
cardSelectionMessageCreator={props.assessmentCardSelectionMessageCreator}
cardsViewData={props.assessmentCardsViewData}
includeStepsText={false}
Copy link
Contributor

Choose a reason for hiding this comment

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

Wait, don't we need these?

@v-viyada v-viyada merged commit bb175aa into main Apr 11, 2024
12 checks passed
@JeevaniChinthala JeevaniChinthala deleted the users/v-jeevanic/TypeScriptFeatureV4 branch May 23, 2024 05:03
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.

5 participants