Skip to content

Commit

Permalink
Demonstrate state as optional in controller guidelines
Browse files Browse the repository at this point in the history
In various examples in the controller guidelines, the `state` controller
option was not optional, even though there is a guideline that says it
should be. This commit updates the documentation so that it shown as
optional.
  • Loading branch information
mcmire committed Nov 27, 2024
1 parent a1100c2 commit 1043096
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/writing-controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class FooController extends BaseController</* ... */> {
state = {},
}: {
messenger: FooControllerMessenger;
state: Partial<FooControllerState>;
state?: Partial<FooControllerState>;
}) {
super({
// ...
Expand Down Expand Up @@ -87,7 +87,7 @@ class FooController extends BaseController</* ... */> {
state = {},
}: {
messenger: FooControllerMessenger;
state: Partial<FooControllerState>;
state?: Partial<FooControllerState>;
}) {
super({
name,
Expand Down Expand Up @@ -158,7 +158,7 @@ class FooController extends BaseController</* ... */> {
state = {},
}: {
messenger: FooControllerMessenger;
state: Partial<FooControllerState>;
state?: Partial<FooControllerState>;
},
isEnabled: boolean,
) {
Expand All @@ -177,7 +177,7 @@ class FooController extends BaseController</* ... */> {
isEnabled,
}: {
messenger: FooControllerMessenger;
state: Partial<FooControllerState>;
state?: Partial<FooControllerState>;
isEnabled: boolean;
}) {
// ...
Expand Down

0 comments on commit 1043096

Please sign in to comment.