We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff9b2ca commit bb1b9e4Copy full SHA for bb1b9e4
packages/builders/src/mixins/Refineable.ts
@@ -13,8 +13,10 @@ export class Refineable {
13
* .setTitle('Hello World')
14
* .setDescription('This is a description')
15
* .refine((b) => {
16
+ * const intermediateValue = computeSomething();
17
+ * b.setFooter(`Computed value: ${intermediateValue}`);
18
* if (externalVariable) {
- * b.setColor('Red');
19
+ * b.setColor(0xff0000);
20
* }
21
* });
22
* ```
@@ -23,4 +25,9 @@ export class Refineable {
23
25
fn(this);
24
26
return this;
27
}
28
+
29
+ public async refineAsync(fn: (builder: this) => Promise<void>): Promise<this> {
30
+ await fn(this);
31
+ return this;
32
+ }
33
0 commit comments