Add JSDoc to suggestion types [skip ci]

This commit is contained in:
James Yu 2023-01-18 00:14:10 +08:00
parent 110b39798c
commit 56f12cd6d7
4 changed files with 25 additions and 8 deletions

View File

@ -16,15 +16,23 @@ const logger = getLogger('Intelli', 'Command')
type DataUnimathSymbolsJsonType = typeof import('../../../data/unimathsymbols.json')
export type CmdType = {
/** Name of the command without the leading \ and with argument signature */
command?: string,
/** Snippet to be inserted after the leading \ */
snippet?: string,
/** The option of package below that activates this cmd */
option?: string,
/** Possible options of this env */
keyvals?: string[],
/** The index of keyval list in package .json file. Should not be used */
keyvalindex?: number,
/** The index of argument which have the keyvals */
keyvalpos?: number,
detail?: string,
documentation?: string,
/** The package providing the environment */
package?: string,
/** The action to be executed after inserting the snippet */
postAction?: string
}

View File

@ -2,8 +2,10 @@ import * as vscode from 'vscode'
import type { ICompletionItem } from '../completion'
export interface CmdSignature {
readonly name: string, // name without leading `\`
readonly args: string // {} for mandatory args and [] for optional args
/** name without leading `\` */
readonly name: string,
/** {} for mandatory args and [] for optional args */
readonly args: string
}
/**

View File

@ -12,13 +12,20 @@ import { getLogger } from '../../components/logger'
const logger = getLogger('Intelli', 'Environment')
export type EnvType = {
name: string, // Name of the environment, what comes inside \begin{...}
snippet?: string, // To be inserted after \begin{..}
/** Name of the environment, what comes inside \begin{...} */
name: string,
/** To be inserted after \begin{..} */
snippet?: string,
/** The option of package below that activates this env */
option?: string,
/** Possible options of this env */
keyvals?: string[],
/** The index of keyval list in package .json file. Should not be used */
keyvalindex?: number,
/** The index of argument which have the keyvals */
keyvalpos?: number,
package?: string, // The package providing the environment
/** The package providing the environment */
package?: string,
detail?: string
}

View File

@ -8,11 +8,11 @@ import {computeFilteringRange} from './completerutils'
import type { IProvider, ICompletionItem } from '../completion'
export interface ReferenceEntry extends ICompletionItem {
// The file that defines the ref.
/** The file that defines the ref. */
file: string,
// The position that defines the ref.
/** The position that defines the ref. */
position: vscode.Position,
// Stores the ref number.
/** Stores the ref number. */
prevIndex?: {refNumber: string, pageNumber: string}
}