Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
khvn26 committed Jul 19, 2024
1 parent 7169904 commit acde5ce
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
8 changes: 0 additions & 8 deletions types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,4 @@ export interface IFlagsmith<F extends string = string, T extends string = string
environmentID: string | null
}

export function isTraitConfig(trait: ITraitConfig | IFlagsmithTrait): trait is ITraitConfig {
return typeof trait == 'object' && trait.value !== undefined;
}

export function isIdentityConfig(identity: IIdentityConfig | string): identity is IIdentityConfig {
return typeof(identity == 'object') && identity.identity !== undefined;
}

export {};
11 changes: 11 additions & 0 deletions types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { IIdentityConfig } from "./types.d";
import { IFlagsmithTrait } from "./types.d";
import { ITraitConfig } from "./types.d";

export function isTraitConfig(trait: ITraitConfig | IFlagsmithTrait): trait is ITraitConfig {
return typeof trait == 'object' && trait.value !== undefined;
}

export function isIdentityConfig(identity: IIdentityConfig | string): identity is IIdentityConfig {
return typeof(identity == 'object') && identity.identifier !== undefined;
}

0 comments on commit acde5ce

Please sign in to comment.