You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ARCHITECTURE.md
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -337,7 +337,14 @@ Abstractly, a 'wizard' is a collection of discrete, linear steps (subroutines),
337
337
338
338
### Creating a Wizard (Quick Picks)
339
339
340
-
A new wizard can be created by extending off the base `Wizard` class, using the template type to specify the shape of the wizard state. All wizards have an internal 'form' property that is used to assign steps. We can assign UI elements (namely, quick picks) using the `bindPrompter` method on form elements. This method accepts a callback that should return a `Prompter` given the current state. For this example, we will use `createQuickPick` and `createInputBox` for our prompters:
340
+
Create a new wizard by extending the base `Wizard` class, using the template type to specify the
341
+
shape of the wizard state. All wizards have an internal `form` property that is used to assign
342
+
steps. You can assign UI elements (namely, quickpicks) using the `bindPrompter` method on form
343
+
elements. This method accepts a callback that should return a `Prompter` given the current state.
344
+
For this example, we will use `createQuickPick` and `createInputBox` for our prompters:
345
+
346
+
If you need to call async functions to construct your `Wizard` subclass, define your init logic in
347
+
the `init()` method instead of the constructor.
341
348
342
349
```ts
343
350
interfaceExampleState {
@@ -382,7 +389,7 @@ Note that all wizards can potentially return `undefined` if the workflow was can
382
389
Use `createWizardTester` on an instance of a wizard. Tests can then be constructed by asserting both the user-defined and internal state. Using the above `ExampleWizard`:
0 commit comments