Skip to content

Commit

Permalink
Make it clear that provider hooks can be properties or methods.
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Abrahms <[email protected]>
  • Loading branch information
justinabrahms committed Aug 2, 2022
1 parent bd96324 commit a757e09
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions specification/sections/02-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,16 @@ Feature flag management systems often need to transform the context structures t

##### Requirement 2.10

> The provider interface **MAY** define a `provider hook` method or function, which can be optionally implemented in order to add `hook` instances to the client.
> The provider interface **MAY** define a `provider hook` mechanism which can be optionally implemented in order to add `hook` instances to the client.
```typescript
```
class MyProvider implements Provider {
//...
List<Hook> providerHooks() {
private readonly hooks: Hook[] = [new MyProviderHook()];
// ..or alternatively..
getProviderHooks(): Hook[] {
return [new MyProviderHook()];
}
Expand Down

0 comments on commit a757e09

Please sign in to comment.