fixed TS strict issues for AuthorizeAccessComponent and SelfServeTypes
This commit is contained in:
parent
acaca4f286
commit
b2e9cb1522
|
@ -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 * as React from "react";
|
||||||
import { ChildrenMargin } from "./GitHubStyleConstants";
|
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: ";
|
"Complete setup by authorizing Azure Cosmos DB to access the repositories in your GitHub account: ";
|
||||||
private static readonly AuthorizeButtonText = "Authorize access";
|
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({
|
this.setState({
|
||||||
scope: option.key,
|
scope: option !== undefined ? option.key : "",
|
||||||
});
|
});
|
||||||
|
|
||||||
private onButtonClick = (): void => this.props.authorizeAccess(this.state.scope);
|
private onButtonClick = (): void => this.props.authorizeAccess(this.state.scope);
|
||||||
|
@ -64,7 +67,7 @@ export class AuthorizeAccessComponent extends React.Component<
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
selectedKey: this.state.scope,
|
selectedKey: this.state.scope,
|
||||||
onChange: this.onChoiceGroupChange,
|
onChange: (_, option: IChoiceGroupOption | undefined) => this.onChoiceGroupChange(_, option),
|
||||||
};
|
};
|
||||||
|
|
||||||
const buttonProps: IButtonProps = {
|
const buttonProps: IButtonProps = {
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
* @module SelfServe/SelfServeTypes
|
* @module SelfServe/SelfServeTypes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import "reflect-metadata";
|
||||||
import { TelemetryData } from "../Shared/Telemetry/TelemetryProcessor";
|
import { TelemetryData } from "../Shared/Telemetry/TelemetryProcessor";
|
||||||
|
|
||||||
interface BaseInput {
|
interface BaseInput {
|
||||||
|
|
|
@ -141,7 +141,9 @@
|
||||||
"./src/Platform/Hosted/Components/SwitchAccount.tsx",
|
"./src/Platform/Hosted/Components/SwitchAccount.tsx",
|
||||||
"./src/Platform/Hosted/Components/SwitchSubscription.tsx",
|
"./src/Platform/Hosted/Components/SwitchSubscription.tsx",
|
||||||
"./src/Common/ErrorHandlingUtils.ts",
|
"./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": [
|
"include": [
|
||||||
"src/CellOutputViewer/transforms/**/*",
|
"src/CellOutputViewer/transforms/**/*",
|
||||||
|
|
Loading…
Reference in New Issue