完善相关参数类型

This commit is contained in:
fofolee 2022-04-15 21:08:16 +08:00
parent 81292e21c8
commit c15a027005

View File

@ -13,7 +13,7 @@ interface quickcommandApi {
* @param title * @param title
*/ */
showButtonBox( showButtonBox(
buttons: array, buttons: string[],
title?: string title?: string
): Promise<{ id: number; text: string }>; ): Promise<{ id: number; text: string }>;
@ -36,9 +36,9 @@ interface quickcommandApi {
* @param title * @param title
*/ */
showInputBox( showInputBox(
options: array | { labels: array; values: array; hints: array }, options: string[] | { labels: string[]; values: string[]; hints: string[] },
title?: string title?: string
): Promise<array>; ): Promise<string[]>;
/** /**
* html时 * html时
@ -81,7 +81,7 @@ interface quickcommandApi {
* true * true
*/ */
showSelectList( showSelectList(
selects: array, selects: string[] | object[],
options?: { options?: {
placeholder: string; placeholder: string;
optionType: "plaintext" | "html" | "json"; optionType: "plaintext" | "html" | "json";
@ -207,7 +207,7 @@ interface quickcommandApi {
* *
* Object时 options utools.showSaveDialog options一致 * Object时 options utools.showSaveDialog options一致
*/ */
downloadFile(url, file?: string | object): Promise<Buffer>; downloadFile(url: string, file?: string | object): Promise<Buffer>;
/** /**
* *