mirror of
https://github.com/45Drives/cockpit-navigator.git
synced 2025-07-31 01:24:37 +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 {
|
export class ModalPrompt {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.ok = document.createElement("button");
|
this.ok = document.createElement("button");
|
||||||
@ -117,7 +124,7 @@ export class ModalPrompt {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} header
|
* @param {string} header
|
||||||
* @param {Object.<string, {label: string, type: string, default: (string|undefined)}>} request
|
* @param {Object.<string, Request>} requests
|
||||||
* @returns {Promise<Object|string>}
|
* @returns {Promise<Object|string>}
|
||||||
*/
|
*/
|
||||||
prompt(header, requests) {
|
prompt(header, requests) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user