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 cc2534a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion specification.json
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
{
"id": "Requirement 2.10",
"machine_id": "requirement_2_10",
"content": "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.",
"content": "The provider interface MAY define a `provider hook` mechanism which can be optionally implemented in order to add `hook` instances to the client.",
"RFC 2119 keyword": "MAY",
"children": []
},
Expand Down
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 cc2534a

Please sign in to comment.