(callable: (messages: string[]) => Promise<T>, description?: string)
| 47 | } |
| 48 | |
| 49 | async exec<T>(callable: (messages: string[]) => Promise<T>, description?: string) { |
| 50 | const messages = this.push(description); |
| 51 | try { |
| 52 | const result = await callable(messages); |
| 53 | return result; |
| 54 | } finally { |
| 55 | this.pop(); |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | execSync<T>(callable: (messages: string[]) => T, description?: string) { |
| 60 | const messages = this.push(description); |