Skip to content

Commit

Permalink
Make traits optional param
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle-ssg committed May 20, 2021
1 parent 1c387df commit a7ef16a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@angular/platform-browser": "~8.2.13",
"@angular/platform-browser-dynamic": "~8.2.13",
"@angular/router": "~8.2.13",
"bullet-train-client": "file://../../bullet-train-client",
"flagsmith": "file://../../flagsmith",
"rxjs": "~6.4.0",
"tslib": "^1.10.0",
"zone.js": "~0.9.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/angular/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component } from '@angular/core';
import flagsmith from 'bullet-train-client';
import flagsmith from 'flagsmith';

@Component({
selector: 'app-root',
Expand Down
2 changes: 1 addition & 1 deletion flagsmith/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ declare class IFlagsmith {
/**
* Identify user, triggers a call to get flags if flagsmith.init has been called
*/
identify:(userId:string, traits: Record<string, string|number|boolean>,) => Promise<IFlags|undefined>
identify:(userId:string, traits?: Record<string, string|number|boolean>,) => Promise<IFlags|undefined>

/**
* Retrieves the current state of flagsmith
Expand Down
2 changes: 1 addition & 1 deletion flagsmith/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flagsmith",
"version": "1.4.0",
"version": "1.4.1",
"description": "Feature flagging to support continuous development",
"main": "./index.js",
"repository": {
Expand Down
3 changes: 1 addition & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ declare class IFlagsmith {
defaultFlags?: IFlags //
}) => Promise<void>


/**
* Trigger a manual fetch of the environment features
*/
Expand All @@ -60,7 +59,7 @@ declare class IFlagsmith {
/**
* Identify user, triggers a call to get flags if flagsmith.init has been called
*/
identify:(userId:string) => Promise<IFlags|undefined>
identify:(userId:string, traits?: Record<string, string|number|boolean>,) => Promise<IFlags|undefined>

/**
* Retrieves the current state of flagsmith
Expand Down
5 changes: 2 additions & 3 deletions react-native-flagsmith/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ declare class IFlagsmith {
defaultFlags?: IFlags //
}) => Promise<void>


/**
* Trigger a manual fetch of the environment features
*/
Expand All @@ -60,7 +59,7 @@ declare class IFlagsmith {
/**
* Identify user, triggers a call to get flags if flagsmith.init has been called
*/
identify:(userId:string) => Promise<IFlags|undefined>
identify:(userId:string, traits?: Record<string, string|number|boolean>,) => Promise<IFlags|undefined>

/**
* Retrieves the current state of flagsmith
Expand Down Expand Up @@ -122,7 +121,7 @@ declare class IFlagsmith {

}

declare module 'react-native-flagsmith' {
declare module 'flagsmith' {
// @ts-ignore
export default new IFlagsmith()
}
Expand Down

0 comments on commit a7ef16a

Please sign in to comment.