Skip to content

Commit e9345dc

Browse files
Move documentation to type instead of methods
1 parent de640e3 commit e9345dc

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

extensions/ql-vscode/src/helpers.ts

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,22 @@ export const tmpDirDisposal = {
4444
};
4545

4646
interface ShowAndLogOptions {
47+
/** The output logger that will receive the message. */
4748
outputLogger?: OutputChannelLogger;
49+
/** A set of items that will be rendered as actions in the message. */
4850
items?: string[];
51+
/**
52+
* An alternate message that is added to the log, but not displayed in the popup.
53+
* This is useful for adding extra detail to the logs that would be too noisy for the popup.
54+
*/
4955
fullMessage?: string;
5056
}
5157

5258
/**
5359
* Show an error message and log it to the console
5460
*
5561
* @param message The message to show.
56-
* @param options.outputLogger The output logger that will receive the message
57-
* @param options.items A set of items that will be rendered as actions in the message.
58-
* @param options.fullMessage An alternate message that is added to the log, but not displayed
59-
* in the popup. This is useful for adding extra detail to the logs
60-
* that would be too noisy for the popup.
62+
* @param options See indivual fields on `ShowAndLogOptions` type.
6163
*
6264
* @return A promise that resolves to the selected item or undefined when being dismissed.
6365
*/
@@ -80,11 +82,7 @@ function dropLinesExceptInitial(message: string, n = 2) {
8082
* Show a warning message and log it to the console
8183
*
8284
* @param message The message to show.
83-
* @param options.outputLogger The output logger that will receive the message
84-
* @param options.items A set of items that will be rendered as actions in the message.
85-
* @param options.fullMessage An alternate message that is added to the log, but not displayed
86-
* in the popup. This is useful for adding extra detail to the logs
87-
* that would be too noisy for the popup.
85+
* @param options See indivual fields on `ShowAndLogOptions` type.
8886
*
8987
* @return A promise that resolves to the selected item or undefined when being dismissed.
9088
*/
@@ -99,11 +97,7 @@ export async function showAndLogWarningMessage(
9997
* Show an information message and log it to the console
10098
*
10199
* @param message The message to show.
102-
* @param options.outputLogger The output logger that will receive the message
103-
* @param options.items A set of items that will be rendered as actions in the message.
104-
* @param options.fullMessage An alternate message that is added to the log, but not displayed
105-
* in the popup. This is useful for adding extra detail to the logs
106-
* that would be too noisy for the popup.
100+
* @param options See indivual fields on `ShowAndLogOptions` type.
107101
*
108102
* @return A promise that resolves to the selected item or undefined when being dismissed.
109103
*/

0 commit comments

Comments
 (0)