Skip to content

Commit

Permalink
fix: update ab and vary types (#75)
Browse files Browse the repository at this point in the history
Noticed some typing issues when going through `tsc` failures.
  • Loading branch information
argvniyx-enroute authored Oct 16, 2024
1 parent 17f2107 commit fbc6044
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/abConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import SplitRegistry from './splitRegistry';

export type ABConfigurationOptions = {
splitName: string;
trueVariant: string | boolean;
trueVariant?: string;
visitor: Visitor;
};

class ABConfiguration {
private _splitName: string;
private _trueVariant: string | boolean;
private _trueVariant?: string;
private _visitor: Visitor;
private _splitRegistry: SplitRegistry;

Expand Down
5 changes: 2 additions & 3 deletions src/visitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ export type VaryOptions = {
};

export type AbOptions = {
callback: (assignment: boolean | string) => void;
callback: (assignment: boolean) => void;
context: string;
trueVariant: boolean | string;
visitor: Visitor;
trueVariant?: string;
};

export type VisitorOptions = {
Expand Down

0 comments on commit fbc6044

Please sign in to comment.