As part of Typescript migration added/removed the error causing fields. As most of the files are test cases which were removed from actual file but not updated the test case files.
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. displayName: 'JSON'
Error: Type '{ key: "json"; displayName: string; generateMenuItem: (onMenuItemClick: (event: MouseEvent<HTMLButtonElement | HTMLAnchorElement, MouseEvent>, selectedServiceKey: ReportExportServiceKey) => void, href: string, download: string) => { ...; }; }' is not assignable to type 'ReportExportService'.
Object literal may only specify known properties, and 'displayName' does not exist in type 'ReportExportService'.
2. columnConfiguration: []
Error : Type '{ instancesMap: DictionaryStringTo<GeneratedAssessmentInstance<{}, {}>>; columnConfiguration: undefined[]; assessmentNavState: { ...; }; ... 4 more ...; hasVisualHelper: true; }' is not assignable to type 'AssessmentInstanceTableProps'
Object literal may only specify known properties, and 'columnConfiguration' does not exist in type 'AssessmentInstanceTableProps'.
3. noClick
Error: Property 'noClick' does not exist on type
4. newTab: newTab
Error: Type '{ deps: { urlParser: UrlParser; getAssessmentActionMessageCreator: () => AssessmentActionMessageCreator; detailsViewId: undefined; }; prevTab: PersistedTabInfo; ... 4 more ...; isOpen: true; }' is not assignable to type 'LoadAssessmentDialogProps'.
Object literal may only specify known properties, and 'newTab' does not exist in type 'LoadAssessmentDialogProps'.
5. showAssessment: true
Error: Type '{ showAssessment: true; showTest: true; }' is not assignable to type 'StartOverContextMenuKeyOptions'.
Object literal may only specify known properties, and 'showAssessment' does not exist in type 'StartOverContextMenuKeyOptions'.
In actual file they removed the StartOverContextMenuKeyOptions 'showAssessment: true,' and didn't removed from test file
6. status: 'fail'
Error: Type '{ deps: { tabStopRequirementActionMessageCreator: TabStopRequirementActionMessageCreator; tabStopsTestViewController: TabStopsTestViewController; }; requirementState: TabStopRequirementState; status: string; }' is not assignable to type 'TabStopsRequirementsTableProps'.
Object literal may only specify known properties, and 'status' does not exist in type 'TabStopsRequirementsTableProps'
7. highlightState: 'hidden
Error: Type '{ deps: InstanceDetailsFooterDeps; result: CardResult; rule: UnifiedRule; targetAppInfo: TargetAppData; highlightState: string; userConfigurationStoreData: UserConfigurationStoreData; }' is not assignable to type 'InstanceDetailsFooterProps'.
Object literal may only specify known properties, and 'highlightState' does not exist in type 'InstanceDetailsFooterProps'.
highlightState was removed from actual file and didn't update the test case.
8. fixInstructionProcessor
Error: Type '{ deps: InstanceDetailsGroupDeps; fixInstructionProcessor: FixInstructionProcessor; recommendColor: RecommendColor; rule: CardRuleResult; userConfigurationStoreData: null; targetAppInfo: { ...; }; cardSelectionMessageCreator: CardSelectionMessageCreator; }' is not assignable to type 'InstanceDetailsGroupProps'.
Object literal may only specify known properties, and 'fixInstructionProcessor' does not exist in type 'InstanceDetailsGroupProps'.
9. showCongratsIfNotInstances: true
Error: Type '{ deps: ResultSectionContentDeps; results: CardRuleResult[]; outcomeType: "pass"; showCongratsIfNotInstances: boolean; userConfigurationStoreData: null; ... 5 more ...; cardSelectionMessageCreator: CardSelectionMessageCreator; }' is not assignable to type 'ResultSectionContentProps'.
Object literal may only specify known properties, and 'showCongratsIfNotInstances' does not exist in type 'ResultSectionContentProps'.
10. iconName="test icon"
Error : Type '{ deps: { contentProvider: ContentProvider; contentActionMessageCreator: ContentActionMessageCreator; }; guidance: string; headingTitle: string; iconName: string; }' is not assignable to type 'IntrinsicAttributes & HeaderWithContentLinkProps & { children?: ReactNode; }'
Property 'iconName' does not exist on type 'IntrinsicAttributes & HeaderWithContentLinkProps
11. selectedTest: VisualizationType[-1]
Here for this error the props imported was wrong instead of AssessmentRequirementScanTelemetryData they used RuleAnalyzerScanTelemetryData due to this getting error.
12. requirementName
Error: Type '{ scanDuration: number; NumberOfElementsScanned: number; include: undefined[]; exclude: undefined[]; testName: string; requirementName: string; }' is not assignable to type 'RuleAnalyzerScanTelemetryData'.
Object literal may only specify known properties, and 'requirementName' does not exist in type 'RuleAnalyzerScanTelemetryData'.
13. status: ManualTestStatus.FAIL,
Error: Type '{ step: string; test: VisualizationType.HeadingsAssessment; status: ManualTestStatus; assessmentInstanceTableHandler: AssessmentInstanceTableHandler; manualTestStepResultMap: { ...; }; assessmentsProvider: AssessmentsProvider; featureFlagStoreData: FeatureFlagStoreData; pathSnippetStoreData: { ...; }; }' is not assignable to type 'ManualTestStepViewProps'.
Object literal may only specify known properties, and 'status' does not exist in type 'ManualTestStepViewProps'.
14. featureFlagStoreData: {},
Error: Type '{ container: DetailsDialog; dialogHandler: IssueDetailsNavigationClickHandler; featureFlagStoreData: {}; failuresCount: number; }' is not assignable to type 'IssueDetailsNavigationControlsProps'.
Object literal may only specify known properties, and 'featureFlagStoreData' does not exist in type 'IssueDetailsNavigationControlsProps'.
15. userConfigurationStoreData
Error: Type '{ deps: IssueFilingSettingsContainerDeps; selectedIssueFilingService: IssueFilingService; userConfigurationStoreData: UserConfigurationStoreData; selectedIssueFilingServiceData: IssueFilingServiceProperties; onPropertyUpdateCallback: () => any; onSelectedServiceChange: () => any; }' is not assignable to type 'IssueFilingSettingsContainerProps'.
Object literal may only specify known properties, and 'userConfigurationStoreData' does not exist in type 'IssueFilingSettingsContainerProps'.
16. featureFlagStoreData: {},
Error: Type '{ backLinkHandler: () => void; diagnosticViewToggleFactory: DiagnosticViewToggleFactory; featureFlagStoreData: {}; }' is not assignable to type 'AdHocToolsPanelProps'.
Object literal may only specify known properties, and 'featureFlagStoreData' does not exist in type 'AdHocToolsPanelProps'.
17. shortcutModifyHandler
Error: Argument of type '{ diagnosticViewClickHandler: null; popupViewControllerHandler: PopupViewControllerHandler; launchPanelHeaderClickHandler: null; shortcutModifyHandler: null; }' is not assignable to parameter of type 'PopupHandlers'.
Object literal may only specify known properties, and 'shortcutModifyHandler' does not exist in type 'PopupHandlers'.
Details
As part of Typescript migration added/removed the error causing fields. As most of the files are test cases which were removed from actual file but not updated the test case files.
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. displayName: 'JSON'
2. columnConfiguration: []
3. noClick
4. newTab: newTab
5. showAssessment: true
6. status: 'fail'
7. highlightState: 'hidden
8. fixInstructionProcessor
9. showCongratsIfNotInstances: true
10. iconName="test icon"
11. selectedTest: VisualizationType[-1]
12. requirementName
13. status: ManualTestStatus.FAIL,
14. featureFlagStoreData: {},
15. userConfigurationStoreData
16. featureFlagStoreData: {},
17. shortcutModifyHandler
Pull request checklist
yarn fastpass
yarn test
)<rootDir>/test-results/unit/coverage
fix:
,chore:
,feat(feature-name):
,refactor:
). SeeCONTRIBUTING.md
.