mirror of
https://github.com/45Drives/cockpit-navigator.git
synced 2025-07-29 08:34:50 +02:00
better typedef for prompt request
This commit is contained in:
parent
ed34952894
commit
f567dd1e7a
@ -1,3 +1,10 @@
|
||||
/**
|
||||
* @typedef {Object} Request
|
||||
* @property {string} label
|
||||
* @property {("text"|"checkbox")} type
|
||||
* @property {string|undefined} default
|
||||
*/
|
||||
|
||||
export class ModalPrompt {
|
||||
constructor() {
|
||||
this.ok = document.createElement("button");
|
||||
@ -117,7 +124,7 @@ export class ModalPrompt {
|
||||
/**
|
||||
*
|
||||
* @param {string} header
|
||||
* @param {Object.<string, {label: string, type: string, default: (string|undefined)}>} request
|
||||
* @param {Object.<string, Request>} requests
|
||||
* @returns {Promise<Object|string>}
|
||||
*/
|
||||
prompt(header, requests) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user