(arg: any)
| 151 | } |
| 152 | |
| 153 | export function confirm(arg: any): Promise<boolean> { |
| 154 | return new Promise<boolean>((resolve, reject) => { |
| 155 | try { |
| 156 | const options = !isDialogOptions(arg) |
| 157 | ? { |
| 158 | title: DialogStrings.CONFIRM, |
| 159 | okButtonText: DialogStrings.OK, |
| 160 | cancelButtonText: DialogStrings.CANCEL, |
| 161 | message: arg + '', |
| 162 | } |
| 163 | : arg; |
| 164 | const alert = createAlertDialog(options); |
| 165 | |
| 166 | addButtonsToAlertDialog(alert, options, function (result) { |
| 167 | resolve(result); |
| 168 | }); |
| 169 | |
| 170 | showDialog(alert); |
| 171 | } catch (ex) { |
| 172 | reject(ex); |
| 173 | } |
| 174 | }); |
| 175 | } |
| 176 | |
| 177 | export function prompt(...args): Promise<PromptResult> { |
| 178 | let options: PromptOptions; |
nothing calls this directly
no test coverage detected