Skip to content

Commit 9f0d926

Browse files
committed
Eslint fix
1 parent 7395b31 commit 9f0d926

File tree

4 files changed

+16
-17
lines changed

4 files changed

+16
-17
lines changed

src/CodeSnippetDisplay.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import { CodeCellModel, MarkdownCell, CodeCell } from '@jupyterlab/cells';
4141
import { Widget } from '@lumino/widgets';
4242
import { find, StringExt } from '@lumino/algorithm';
4343
import { Drag } from '@lumino/dragdrop';
44-
import { MimeData } from '@lumino/coreutils';
44+
import { MimeData, ReadonlyPartialJSONObject } from '@lumino/coreutils';
4545

4646
import React from 'react';
4747
import { CodeSnippetService, ICodeSnippet } from './CodeSnippetService';
@@ -92,7 +92,6 @@ import {
9292
sasIcon,
9393
powershellIcon,
9494
} from './CodeSnippetLanguages';
95-
import { ICodeSnippetEditorMetadata } from './CodeSnippetEditor';
9695
import { showMessage } from './CodeSnippetMessage';
9796

9897
/**
@@ -155,7 +154,7 @@ interface ICodeSnippetDisplayProps {
155154
codeSnippetManager: CodeSnippetService;
156155
app: JupyterFrontEnd;
157156
getCurrentWidget: () => Widget;
158-
openCodeSnippetEditor: (args: ICodeSnippetEditorMetadata) => void;
157+
openCodeSnippetEditor: (args: ReadonlyPartialJSONObject) => void;
159158
editorServices: IEditorServices;
160159
updateCodeSnippetWidget: () => void;
161160
}

src/CodeSnippetMenu.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ const OPTIONS_BODY = 'jp-codeSnippet-options-body';
2222
*
2323
* @returns A promise that resolves with whether the code snippet options was accepted.
2424
*/
25-
export function showMoreOptions<T>(
26-
options: Partial<OptionsMessage.IOptions<T>> = {}
25+
export function showMoreOptions(
26+
options: Partial<OptionsMessage.IOptions> = {}
2727
): Promise<void> {
2828
const optionsMessage = new OptionsMessage(options);
2929
return optionsMessage.launch();
@@ -32,8 +32,8 @@ export function showMoreOptions<T>(
3232
/**
3333
* A widget used to show options message.
3434
*/
35-
export class OptionsMessage<T> extends Widget {
36-
constructor(options: Partial<OptionsMessage.IOptions<T>> = {}) {
35+
export class OptionsMessage extends Widget {
36+
constructor(options: Partial<OptionsMessage.IOptions> = {}) {
3737
super();
3838
this.addClass(OPTIONS_CLASS);
3939
const renderer = OptionsMessage.defaultRenderer;
@@ -183,7 +183,7 @@ export namespace OptionsMessage {
183183
*/
184184
export type Body = Widget;
185185

186-
export interface IOptions<T> {
186+
export interface IOptions {
187187
/**
188188
* The main body element for the code snippet options or a message to display.
189189
* Defaults to an empty string.
@@ -254,7 +254,7 @@ export namespace OptionsMessage {
254254
/**
255255
* The code snippet options widget tracker.
256256
*/
257-
export const tracker = new WidgetTracker<OptionsMessage<any>>({
257+
export const tracker = new WidgetTracker<OptionsMessage>({
258258
namespace: '@jupyterlab/code_snippet:OptionsWidget',
259259
});
260260
}

src/CodeSnippetPreview.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ const PREVIEW_BODY = 'jp-codeSnippet-preview-body';
2424
* @param options - The preview setup options.
2525
*
2626
*/
27-
export function showPreview<T>(
28-
options: Partial<Preview.IOptions<T>> = {},
27+
export function showPreview(
28+
options: Partial<Preview.IOptions> = {},
2929
editorServices: IEditorServices
3030
): Promise<void> {
3131
//Insert check method to see if the preview is already open
@@ -39,7 +39,7 @@ export function showPreview<T>(
3939
/**
4040
* A widget used to show preview
4141
*/
42-
export class Preview<T> extends Widget {
42+
export class Preview extends Widget {
4343
ready: boolean;
4444
_title: string;
4545
_id: number;
@@ -49,7 +49,7 @@ export class Preview<T> extends Widget {
4949
codeSnippetService: CodeSnippetService;
5050
private _hasRefreshedSinceAttach: boolean;
5151
constructor(
52-
options: Partial<Preview.IOptions<T>> = {},
52+
options: Partial<Preview.IOptions> = {},
5353
editorServices: IEditorServices
5454
) {
5555
super();
@@ -198,7 +198,7 @@ export namespace Preview {
198198
*/
199199
export type Body = Widget;
200200

201-
export interface IOptions<T> {
201+
export interface IOptions {
202202
title: string;
203203
id: number;
204204
/**
@@ -261,7 +261,7 @@ export namespace Preview {
261261
/**
262262
* The preview widget tracker.
263263
*/
264-
export const tracker = new WidgetTracker<Preview<any>>({
264+
export const tracker = new WidgetTracker<Preview>({
265265
namespace: '@jupyterlab/code_snippet:preview',
266266
});
267267
}

src/CodeSnippetWidget.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { Widget } from '@lumino/widgets';
2323
import { Message } from '@lumino/messaging';
2424
import { Signal } from '@lumino/signaling';
2525
import { IDragEvent } from '@lumino/dragdrop';
26-
import { MimeData } from '@lumino/coreutils';
26+
import { MimeData, ReadonlyPartialJSONObject } from '@lumino/coreutils';
2727

2828
import { CodeSnippetService, ICodeSnippet } from './CodeSnippetService';
2929
import { CodeSnippetDisplay } from './CodeSnippetDisplay';
@@ -94,7 +94,7 @@ export class CodeSnippetWidget extends ReactWidget {
9494
this.updateCodeSnippetWidget();
9595
}
9696

97-
openCodeSnippetEditor(args: any): void {
97+
openCodeSnippetEditor(args: ReadonlyPartialJSONObject): void {
9898
this.app.commands.execute(commands.OPEN_CODE_SNIPPET_EDITOR, args);
9999
}
100100

0 commit comments

Comments
 (0)