Skip to content

Commit 46f74a7

Browse files
khvn26kyle-ssg
andauthored
fix: Incorrect argument type, interface extension (#261)
* fix: Incorrect argument type, interface extension --------- Co-authored-by: Kyle Johnson <kyle@solidstategroup.com>
1 parent a755ff4 commit 46f74a7

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

flagsmith-core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ const Flagsmith = class {
677677
return this.evaluationContext;
678678
}
679679

680-
updateContext = (evaluationContext: EvaluationContext) => {
680+
updateContext = (evaluationContext: ClientEvaluationContext) => {
681681
return this.setContext({
682682
...this.getContext(),
683683
...evaluationContext,

lib/flagsmith-es/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flagsmith-es",
3-
"version": "7.0.1",
3+
"version": "7.0.2",
44
"description": "Feature flagging to support continuous development. This is an esm equivalent of the standard flagsmith npm module.",
55
"main": "./index.js",
66
"type": "module",

lib/flagsmith/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flagsmith",
3-
"version": "7.0.1",
3+
"version": "7.0.2",
44
"description": "Feature flagging to support continuous development",
55
"main": "./index.js",
66
"repository": {

lib/react-native-flagsmith/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-flagsmith",
3-
"version": "7.0.1",
3+
"version": "7.0.2",
44
"description": "Feature flagging to support continuous development",
55
"main": "./index.js",
66
"repository": {

types.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ export declare type ITraits<T extends string = string> = Record<T, IFlagsmithTra
2020
export declare type Traits<T extends string = string> = Record<T, TraitEvaluationContext | null>;
2121

2222
export interface ClientIdentityEvaluationContext extends IdentityEvaluationContext {
23-
traits?: ITraits;
23+
traits?: null | ITraits;
2424
}
25-
export interface ClientEvaluationContext extends EvaluationContext {
25+
export interface ClientEvaluationContext extends Omit<EvaluationContext, "identity"> {
2626
identity?: null | ClientIdentityEvaluationContext;
2727
}
2828

@@ -153,7 +153,7 @@ export interface IFlagsmith<F extends string = string, T extends string = string
153153
/**
154154
* Merge current evaluation context with the provided one. Refresh the flags.
155155
*/
156-
updateContext: () => Promise<void>;
156+
updateContext: (context: ClientEvaluationContext) => Promise<void>;
157157
/**
158158
/**
159159
* Get current context.

0 commit comments

Comments
 (0)