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
also initialize [automatic feedback surveys](https://github.com/bucketco/bucket-javascript-sdk/tree/main/packages/browser-sdk#qualitative-feedback).
48
45
49
-
## Feature resolution methods
50
-
51
-
The Bucket OpenFeature Provider implements the OpenFeature evaluation interface for different value types. Each method handles the resolution of feature flags according to the OpenFeature specification.
52
-
53
-
### Common behavior
54
-
55
-
All resolution methods share these behaviors:
56
-
57
-
- Return default value with `PROVIDER_NOT_READY` if client is not initialized,
58
-
- Return default value with `FLAG_NOT_FOUND` if flag doesn't exist,
59
-
- Return default value with `ERROR` if there was a type mismatch,
60
-
- Return evaluated value with `TARGETING_MATCH` on successful resolution.
61
-
62
-
### Type-Specific Methods
63
-
64
-
#### Boolean Resolution
65
-
66
-
```ts
67
-
client.getBooleanValue("my-flag", false);
68
-
```
69
-
70
-
Returns the feature's enabled state. This is the most common use case for feature flags.
71
-
72
-
#### String Resolution
73
-
74
-
```ts
75
-
client.getStringValue("my-flag", "default");
76
-
```
77
-
78
-
Returns the feature's remote config key (also known as "variant"). Useful for multi-variate use cases.
79
-
80
-
#### Number Resolution
81
-
82
-
```ts
83
-
client.getNumberValue("my-flag", 0);
84
-
```
85
-
86
-
Not directly supported by Bucket. Use `getObjectValue` instead for numeric configurations.
0 commit comments