Type alias PromiseResolvable<T>

PromiseResolvable<T>: T | ((...params) => T | Promise<T>)

Either the required type T, or a function that returns the required type T, OR a function that returns a Promise with the required type T.

Example

let x: PromiseResolvable<SubmenuItem[]>;
x = () => {
return new Promise((resolve, reject) => {
resolve([
{action: actions.minimize, order: 0, grouporder: 0},
{action: actions.maximize, order: 10, grouporder: 0},
{action: actions.closeWindow, order: 20, grouporder: 0},
])
})
}

Type Parameters

  • T