Skip to content

Commit 80baa18

Browse files
committed
Refactor code to remove unused JSDoc types
1 parent 3b70591 commit 80baa18

File tree

8 files changed

+1
-47
lines changed

8 files changed

+1
-47
lines changed

src/client/common/extensions.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ declare interface String {
2828
/**
2929
* Appropriately formats a string so it can be used as an argument for a command in a shell.
3030
* E.g. if an argument contains a space, then it will be enclosed within double quotes.
31-
* @param {String} value.
3231
*/
3332
String.prototype.toCommandArgumentForPythonExt = function (this: string): string {
3433
if (!this) {

src/client/repl/nativeRepl.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ export class NativeRepl implements Disposable {
109109

110110
/**
111111
* Function that check if NotebookController for REPL exists, and returns it in Singleton manner.
112-
* @returns NotebookController
113112
*/
114113
public setReplController(): NotebookController {
115114
if (!this.replController) {
@@ -125,8 +124,6 @@ export class NativeRepl implements Disposable {
125124

126125
/**
127126
* Function that checks if native REPL's text input box contains complete code.
128-
* @param activeEditor
129-
* @param pythonServer
130127
* @returns Promise<boolean> - True if complete/Valid code is present, False otherwise.
131128
*/
132129
public async checkUserInputCompleteCode(activeEditor: TextEditor | undefined): Promise<boolean> {
@@ -147,7 +144,6 @@ export class NativeRepl implements Disposable {
147144

148145
/**
149146
* Function that opens interactive repl, selects kernel, and send/execute code to the native repl.
150-
* @param code
151147
*/
152148
public async sendToNativeRepl(code?: string): Promise<void> {
153149
const notebookEditor = await openInteractiveREPL(this.replController, this.notebookDocument);

src/client/repl/replCommandHandler.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ import { PVSC_EXTENSION_ID } from '../common/constants';
1616

1717
/**
1818
* Function that opens/show REPL using IW UI.
19-
* @param notebookController
20-
* @param notebookEditor
21-
* @returns notebookEditor
2219
*/
2320
export async function openInteractiveREPL(
2421
notebookController: NotebookController,
@@ -46,10 +43,6 @@ export async function openInteractiveREPL(
4643

4744
/**
4845
* Function that selects notebook Kernel.
49-
* @param notebookEditor
50-
* @param notebookControllerId
51-
* @param extensionId
52-
* @return Promise<void>
5346
*/
5447
export async function selectNotebookKernel(
5548
notebookEditor: NotebookEditor,
@@ -65,9 +58,6 @@ export async function selectNotebookKernel(
6558

6659
/**
6760
* Function that executes notebook cell given code.
68-
* @param notebookDocument
69-
* @param code
70-
* @return Promise<void>
7161
*/
7262
export async function executeNotebookCell(notebookEditor: NotebookEditor, code: string): Promise<void> {
7363
const { notebook, replOptions } = notebookEditor;
@@ -83,8 +73,6 @@ export async function executeNotebookCell(notebookEditor: NotebookEditor, code:
8373
/**
8474
* Function that adds cell to notebook.
8575
* This function will only get called when notebook document is defined.
86-
* @param code
87-
*
8876
*/
8977
async function addCellToNotebook(notebookDocument: NotebookDocument, index: number, code: string): Promise<void> {
9078
const notebookCellData = new NotebookCellData(NotebookCellKind.Code, code as string, 'python');

src/client/repl/replCommands.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ import { EventName } from '../telemetry/constants';
2020

2121
/**
2222
* Register Start Native REPL command in the command palette
23-
*
24-
* @param disposables
25-
* @param interpreterService
26-
* @param commandManager
27-
* @returns Promise<void>
2823
*/
2924
export async function registerStartNativeReplCommand(
3025
disposables: Disposable[],
@@ -46,9 +41,6 @@ export async function registerStartNativeReplCommand(
4641

4742
/**
4843
* Registers REPL command for shift+enter if sendToNativeREPL setting is enabled.
49-
* @param disposables
50-
* @param interpreterService
51-
* @returns Promise<void>
5244
*/
5345
export async function registerReplCommands(
5446
disposables: Disposable[],
@@ -88,8 +80,6 @@ export async function registerReplCommands(
8880

8981
/**
9082
* Command triggered for 'Enter': Conditionally call interactive.execute OR insert \n in text input box.
91-
* @param disposables
92-
* @param interpreterService
9383
*/
9484
export async function registerReplExecuteOnEnter(
9585
disposables: Disposable[],

src/client/repl/replUtils.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { getMultiLineSelectionText, getSingleLineSelectionText } from '../termin
99

1010
/**
1111
* Function that executes selected code in the terminal.
12-
* @returns Promise<void>
1312
*/
1413
export async function executeInTerminal(): Promise<void> {
1514
await commands.executeCommand(Commands.Exec_Selection_In_Terminal);
@@ -45,12 +44,7 @@ export function getSendToNativeREPLSetting(): boolean {
4544
return configuration.get<boolean>('REPL.sendToNativeREPL', false);
4645
}
4746

48-
/**
49-
* Function that inserts new line in the given (input) text editor
50-
* @param activeEditor
51-
* @returns void
52-
*/
53-
47+
// Function that inserts new line in the given (input) text editor
5448
export function insertNewLineToREPLInput(activeEditor: TextEditor | undefined): void {
5549
if (activeEditor) {
5650
const position = activeEditor.selection.active;
@@ -70,9 +64,6 @@ export function isMultiLineText(textEditor: TextEditor): boolean {
7064
/**
7165
* Function that trigger interpreter warning if invalid interpreter.
7266
* Function will also return undefined or active interpreter
73-
* @parm uri
74-
* @param interpreterService
75-
* @returns Promise<PythonEnvironment | undefined>
7667
*/
7768
export async function getActiveInterpreter(
7869
uri: Uri,
@@ -88,7 +79,6 @@ export async function getActiveInterpreter(
8879

8980
/**
9081
* Function that will return ViewColumn for existing Native REPL that belongs to given NotebookDocument.
91-
* @returns ViewColumn | undefined
9282
*/
9383
export function getExistingReplViewColumn(notebookDocument: NotebookDocument): ViewColumn | undefined {
9484
const ourNotebookUri = notebookDocument.uri.toString();

src/test/common/utils/decorators.unit.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,6 @@ suite('Common Utils - Decorators', function () {
8989
* await new Promise(resolve = setTimeout(resolve, 100))
9090
* console.log(currentTime - startTijme)
9191
* ```
92-
*
93-
* @param {number} actualDelay
94-
* @param {number} expectedDelay
9592
*/
9693
function assertElapsedTimeWithinRange(actualDelay: number, expectedDelay: number) {
9794
const difference = actualDelay - expectedDelay;

src/test/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ process.on('unhandledRejection', (ex: any, _a) => {
4444

4545
/**
4646
* Configure the test environment and return the optoins required to run moch tests.
47-
*
48-
* @returns {SetupOptions}
4947
*/
5048
function configure(): SetupOptions {
5149
process.env.VSC_PYTHON_CI_TEST = '1';
@@ -103,7 +101,6 @@ function configure(): SetupOptions {
103101
* to complete.
104102
* That's when we know out PVSC extension specific code is ready for testing.
105103
* So, this code needs to run always for every test running in VS Code (what we call these `system test`) .
106-
* @returns
107104
*/
108105
function activatePythonExtensionScript() {
109106
const ex = new Error('Failed to initialize Python extension for tests after 3 minutes');

src/test/mocks/vsc/arrays.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,6 @@ export function sortedDiff<T>(before: T[], after: T[], compare: (a: T, b: T) =>
186186
/**
187187
* Takes two *sorted* arrays and computes their delta (removed, added elements).
188188
* Finishes in `Math.min(before.length, after.length)` steps.
189-
* @param before
190-
* @param after
191-
* @param compare
192189
*/
193190
export function delta<T>(before: T[], after: T[], compare: (a: T, b: T) => number): { removed: T[]; added: T[] } {
194191
const splices = sortedDiff(before, after, compare);

0 commit comments

Comments
 (0)