fixed TS strict issues for AuthorizeAccessComponent and SelfServeTypes

This commit is contained in:
vaidankarswapnil 2021-08-19 11:34:08 +05:30
parent acaca4f286
commit b2e9cb1522
3 changed files with 11 additions and 5 deletions

View File

@ -1,4 +1,4 @@
import { ChoiceGroup, IButtonProps, IChoiceGroupProps, PrimaryButton, IChoiceGroupOption } from "@fluentui/react";
import { ChoiceGroup, IButtonProps, IChoiceGroupOption, IChoiceGroupProps, PrimaryButton } from "@fluentui/react";
import * as React from "react";
import { ChildrenMargin } from "./GitHubStyleConstants";
@ -34,9 +34,12 @@ export class AuthorizeAccessComponent extends React.Component<
"Complete setup by authorizing Azure Cosmos DB to access the repositories in your GitHub account: ";
private static readonly AuthorizeButtonText = "Authorize access";
private onChoiceGroupChange = (event: React.SyntheticEvent<HTMLElement>, option: IChoiceGroupOption): void =>
private onChoiceGroupChange = (
_: React.FormEvent<HTMLElement | HTMLInputElement> | undefined,
option: IChoiceGroupOption | undefined
): void =>
this.setState({
scope: option.key,
scope: option !== undefined ? option.key : "",
});
private onButtonClick = (): void => this.props.authorizeAccess(this.state.scope);
@ -64,7 +67,7 @@ export class AuthorizeAccessComponent extends React.Component<
},
],
selectedKey: this.state.scope,
onChange: this.onChoiceGroupChange,
onChange: (_, option: IChoiceGroupOption | undefined) => this.onChoiceGroupChange(_, option),
};
const buttonProps: IButtonProps = {

View File

@ -2,6 +2,7 @@
* @module SelfServe/SelfServeTypes
*/
import "reflect-metadata";
import { TelemetryData } from "../Shared/Telemetry/TelemetryProcessor";
interface BaseInput {

View File

@ -141,7 +141,9 @@
"./src/Platform/Hosted/Components/SwitchAccount.tsx",
"./src/Platform/Hosted/Components/SwitchSubscription.tsx",
"./src/Common/ErrorHandlingUtils.ts",
"./src/Explorer/Controls/AccessibleElement/AccessibleElement.tsx"
"./src/Explorer/Controls/AccessibleElement/AccessibleElement.tsx",
"./src/SelfServe/SelfServeTypes.ts",
"./src/Explorer/Controls/GitHub/AuthorizeAccessComponent.tsx"
],
"include": [
"src/CellOutputViewer/transforms/**/*",