Skip to content

Commit 9b5d06a

Browse files
authored
Fix all typedoc warnings and enforce fixes (#428)
1 parent 3eb2e54 commit 9b5d06a

32 files changed

+134
-64
lines changed

packages/react/src/components/cell/CellAdapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ import getMarked from '../notebook/marked/marked';
7070
import CellCommands from './CellCommands';
7171
import { cellsStore } from './CellState';
7272

73-
interface BoxOptions {
73+
export interface BoxOptions {
7474
showToolbar?: boolean;
7575
}
7676

packages/react/src/components/codemirror/CodeMirrorOutputToolbar.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ import { EditorView } from 'codemirror';
2323
import OutputAdapter from '../output/OutputAdapter';
2424
import Kernel from '../../jupyter/kernel/Kernel';
2525

26-
type Props = {
26+
export type CodeMirrorOutputToolbarProps = {
2727
editorView?: EditorView;
2828
codePre?: string;
2929
kernel: Kernel;
3030
outputAdapter: OutputAdapter;
3131
executeCode: (editorView?: EditorView, code?: string) => void;
3232
};
3333

34-
const CodeMirrorOutputToolbarMenu = (props: Props) => {
34+
const CodeMirrorOutputToolbarMenu = (props: CodeMirrorOutputToolbarProps) => {
3535
const { executeCode, outputAdapter, editorView } = props;
3636
return (
3737
<ActionMenu>
@@ -96,7 +96,9 @@ const KernelStatus: React.FC<{ color: string }> = ({ color }) => (
9696
/>
9797
);
9898

99-
export const CodeMirrorOutputToolbar = (props: Props) => {
99+
export const CodeMirrorOutputToolbar = (
100+
props: CodeMirrorOutputToolbarProps
101+
) => {
100102
const { executeCode, editorView, kernel, codePre } = props;
101103
const { theme } = useTheme();
102104
const okColor = useMemo(

packages/react/src/components/console/ConsoleAdapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { Kernel } from '../../jupyter/kernel';
2525

2626
const DEFAULT_CONSOLE_PATH = 'console-path';
2727

28-
class ConsoleAdapter {
28+
export class ConsoleAdapter {
2929
private _panel: BoxPanel;
3030
private _code?: string;
3131

packages/react/src/components/jupyterlab/JupyterLabAppAdapter.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ import { NotebookPanel } from '@jupyterlab/notebook';
1818
import { ServiceManager } from '@jupyterlab/services';
1919
import { JupyterLabAppProps } from './JupyterLabApp';
2020

21-
type Plugin = JupyterFrontEndPlugin<any, any, any> & {
21+
export type Plugin = JupyterFrontEndPlugin<any, any, any> & {
2222
service: any;
2323
};
2424

25-
type Plugins = Map<string, Plugin>;
25+
export type Plugins = Map<string, Plugin>;
2626

27-
type Props = JupyterLabAppProps & {
27+
export type JupyterLabAppAdapterProps = JupyterLabAppProps & {
2828
serviceManager: ServiceManager.IManager;
2929
collaborative?: boolean;
3030
};
@@ -36,7 +36,7 @@ export class JupyterLabAppAdapter {
3636
private _ready: Promise<void>;
3737
private _readyResolve: () => void;
3838

39-
constructor(props: Props, jupyterlab?: JupyterLab) {
39+
constructor(props: JupyterLabAppAdapterProps, jupyterlab?: JupyterLab) {
4040
if (jupyterlab) {
4141
this._jupyterLab = jupyterlab;
4242
this._ready = new Promise((resolve, _) => {
@@ -52,7 +52,7 @@ export class JupyterLabAppAdapter {
5252
this.load(props);
5353
}
5454

55-
private async load(props: Props) {
55+
private async load(props: JupyterLabAppAdapterProps) {
5656
const {
5757
disabledPlugins,
5858
hostId,

packages/react/src/components/kernel/KernelActionMenu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ import { RestartIcon } from '@datalayer/icons-react';
1414
import OutputAdapter from '../output/OutputAdapter';
1515
import Kernel from '../../jupyter/kernel/Kernel';
1616

17-
type Props = {
17+
export type KernelActionMenuProps = {
1818
kernel?: Kernel;
1919
outputAdapter?: OutputAdapter;
2020
};
2121

22-
export const KernelActionMenu = (props: Props) => {
22+
export const KernelActionMenu = (props: KernelActionMenuProps) => {
2323
const { kernel, outputAdapter } = props;
2424
return (
2525
<ActionMenu>

packages/react/src/components/kernel/KernelDetective.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
} from '@jupyterlab/services';
1414
import { Box, Text, Label, Button } from '@primer/react';
1515

16-
type IKernelDetectiveProps = {
16+
export type IKernelDetectiveProps = {
1717
serviceManager?: ServiceManager.IManager;
1818
};
1919

packages/react/src/components/kernel/KernelInspector.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import Kernel from '../../jupyter/kernel/Kernel';
1010
import { KernelSpyView } from './inspector/widget';
1111
import { Box } from '@primer/react';
1212

13-
type Props = {
13+
export type KernelInspectorProps = {
1414
kernel?: Kernel;
1515
};
1616

17-
export const KernelInspector = (props: Props) => {
17+
export const KernelInspector = (props: KernelInspectorProps) => {
1818
const { kernel } = props;
1919
const [kernelSpyView, setKernelSpyView] = useState<KernelSpyView>();
2020
useEffect(() => {

packages/react/src/components/kernel/KernelSelector.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { IModel } from '@jupyterlab/services/lib/kernel/kernel';
1414
import { ISpecModel } from '@jupyterlab/services/lib/kernelspec/kernelspec';
1515
import { useJupyter } from '../../jupyter/JupyterContext';
1616

17-
type Props = {
17+
export type KernelSelectorProps = {
1818
selectKernel: (kernelModel: IModel) => void;
1919
selectKernelSpec: (kernelSpecModel: ISpecModel) => void;
2020
};
@@ -25,7 +25,7 @@ type KernelSpecs =
2525
}
2626
| undefined;
2727

28-
export const KernelSelector = (props: Props) => {
28+
export const KernelSelector = (props: KernelSelectorProps) => {
2929
const { selectKernel, selectKernelSpec } = props;
3030
const { serviceManager } = useJupyter();
3131
const [kernels, setKernels] = useState<IModel[]>();

packages/react/src/components/kernel/KernelUsage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ print(f"""{{
7171
"host_virtual_memory": {str(host_virtual_memory)}
7272
}}""")
7373
`;
74-
type Props = {
74+
export type KernelUsageProps = {
7575
kernel?: Kernel;
7676
};
7777

78-
export const KernelUsage = (props: Props) => {
78+
export const KernelUsage = (props: KernelUsageProps) => {
7979
const { kernel } = props;
8080
const [usage, setUsage] = useState({});
8181
const [virtualMemoryTotal, setVirtualMemoryTotal] = useState<number>();

packages/react/src/components/kernel/KernelVariables.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ import {
1313
} from './variables/variablesinspector';
1414
import { VariableInspectorPanel } from './variables/widget';
1515

16-
type Props = {
16+
export type KernelVariablesProps = {
1717
kernel?: Kernel;
1818
};
1919

20-
export const KernelVariables = (props: Props) => {
20+
export const KernelVariables = (props: KernelVariablesProps) => {
2121
const { kernel } = props;
2222
const [panel, setPanel] = useState<VariableInspectorPanel>();
2323
useEffect(() => {

0 commit comments

Comments
 (0)