Add Files to TypeScript Strict Mode (#777)
This commit is contained in:
parent
d76aaca0dd
commit
2d506f0312
|
@ -5,7 +5,7 @@ export interface TooltipProps {
|
|||
children: string;
|
||||
}
|
||||
|
||||
export const InfoTooltip: React.FunctionComponent = ({ children }: TooltipProps) => {
|
||||
export const InfoTooltip: React.FunctionComponent<TooltipProps> = ({ children }: TooltipProps) => {
|
||||
return (
|
||||
<span>
|
||||
<TooltipHost content={children}>
|
||||
|
|
|
@ -103,7 +103,7 @@ export const Dialog: FunctionComponent<DialogProps> = ({
|
|||
text: secondaryButtonText,
|
||||
onClick: onSecondaryButtonClick,
|
||||
}
|
||||
: undefined;
|
||||
: {};
|
||||
|
||||
return (
|
||||
<FluentDialog {...dialogProps}>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { CommandButton, FontIcon, FontWeights, ITextProps, Separator, Stack, Text } from "@fluentui/react";
|
||||
import * as React from "react";
|
||||
import { Stack, Text, Separator, FontIcon, CommandButton, FontWeights, ITextProps } from "@fluentui/react";
|
||||
|
||||
export class GalleryHeaderComponent extends React.Component {
|
||||
private static readonly azureText = "Microsoft Azure";
|
||||
|
@ -61,7 +61,7 @@ export class GalleryHeaderComponent extends React.Component {
|
|||
<Stack.Item>
|
||||
{this.renderHeaderItem(
|
||||
GalleryHeaderComponent.galleryText,
|
||||
undefined,
|
||||
() => "",
|
||||
GalleryHeaderComponent.headerItemTextProps
|
||||
)}
|
||||
</Stack.Item>
|
||||
|
|
|
@ -53,7 +53,7 @@ export class PromptPure extends React.Component<Props> {
|
|||
}
|
||||
}
|
||||
|
||||
const makeMapStateToProps = (state: CdbAppState, ownProps: ComponentProps): ((state: CdbAppState) => StateProps) => {
|
||||
const makeMapStateToProps = (_state: CdbAppState, ownProps: ComponentProps): ((state: CdbAppState) => StateProps) => {
|
||||
const mapStateToProps = (state: CdbAppState) => {
|
||||
const { contentRef, id } = ownProps;
|
||||
const model = selectors.model(state, { contentRef });
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
import { AppState, ContentRef, DocumentRecordProps, selectors } from "@nteract/core";
|
||||
import { RecordOf } from "immutable";
|
||||
import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import "./CellLabeler.less";
|
||||
|
||||
import { AppState, ContentRef, selectors, DocumentRecordProps } from "@nteract/core";
|
||||
import { RecordOf } from "immutable";
|
||||
|
||||
interface ComponentProps {
|
||||
id: string;
|
||||
contentRef: ContentRef; // TODO: Make this per contentRef?
|
||||
|
@ -29,7 +28,7 @@ class CellLabeler extends React.Component<ComponentProps & StateProps> {
|
|||
}
|
||||
}
|
||||
|
||||
const makeMapStateToProps = (state: AppState, ownProps: ComponentProps): ((state: AppState) => StateProps) => {
|
||||
const makeMapStateToProps = (_state: AppState, ownProps: ComponentProps): ((state: AppState) => StateProps) => {
|
||||
const mapStateToProps = (state: AppState) => {
|
||||
const model = selectors.model(state, { contentRef: ownProps.contentRef });
|
||||
const cellOrder = selectors.notebook.cellOrder(model as RecordOf<DocumentRecordProps>);
|
||||
|
|
|
@ -18,7 +18,7 @@ export async function fetchPhoto(accessToken: string): Promise<Blob | void> {
|
|||
}
|
||||
|
||||
export function useGraphPhoto(graphToken: string): string {
|
||||
const [photo, setPhoto] = useState<string>();
|
||||
const [photo, setPhoto] = useState<string>("");
|
||||
|
||||
useEffect(() => {
|
||||
if (graphToken) {
|
||||
|
|
|
@ -8,6 +8,13 @@
|
|||
"noUnusedParameters": true
|
||||
},
|
||||
"files": [
|
||||
"./src/hooks/useGraphPhoto.tsx",
|
||||
"./src/Explorer/Notebook/NotebookRenderer/decorators/CellLabeler.tsx",
|
||||
"./src/Explorer/Notebook/NotebookRenderer/Prompt.tsx",
|
||||
"./src/Explorer/Controls/Header/GalleryHeaderComponent.tsx",
|
||||
"./src/Explorer/Controls/Header/GalleryHeaderComponent.tsx",
|
||||
"./src/Explorer/Controls/Dialog.tsx",
|
||||
"./src/Common/Tooltip/InfoTooltip.tsx",
|
||||
"./src/AuthType.ts",
|
||||
"./src/Bindings/ReactBindingHandler.ts",
|
||||
"./src/Common/ArrayHashMap.ts",
|
||||
|
|
Loading…
Reference in New Issue