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.
T
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}, ]) }) } Copy
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}, ]) }) }
Either the required type
T
, or a function that returns the required typeT
, OR a function that returns a Promise with the required typeT
.Example