Skip to content

Commit 970a5a3

Browse files
Merge branch 'refactor-init' into refactor-impressions-tracker
2 parents 16dea9f + 82acca2 commit 970a5a3

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/dtos/types.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ export interface IDependencyMatcherData {
4141

4242
interface ISplitMatcherBase {
4343
matcherType: string
44-
negate: boolean
45-
keySelector: null | {
44+
negate?: boolean
45+
keySelector?: null | {
4646
trafficType: string,
47-
attribute: string | null
47+
attribute?: string | null
4848
}
4949
userDefinedSegmentMatcherData?: null | IInSegmentMatcherData
5050
userDefinedLargeSegmentMatcherData?: null | IInLargeSegmentMatcherData
@@ -207,7 +207,7 @@ export interface IExcludedSegment {
207207
export interface IRBSegment {
208208
name: string,
209209
changeNumber: number,
210-
status: 'ACTIVE' | 'ARCHIVED',
210+
status?: 'ACTIVE' | 'ARCHIVED',
211211
conditions?: ISplitCondition[] | null,
212212
excluded?: {
213213
keys?: string[] | null,
@@ -218,7 +218,7 @@ export interface IRBSegment {
218218
export interface ISplit {
219219
name: string,
220220
changeNumber: number,
221-
status: 'ACTIVE' | 'ARCHIVED',
221+
status?: 'ACTIVE' | 'ARCHIVED',
222222
conditions: ISplitCondition[],
223223
prerequisites?: null | {
224224
n: string,

src/evaluator/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export interface IMatcherDto {
1313
name: string
1414
value?: string | number | boolean | string[] | IDependencyMatcherData | IBetweenMatcherData | IBetweenStringMatcherData | null
1515

16-
attribute: string | null
17-
negate: boolean
16+
attribute?: string | null
17+
negate?: boolean
1818
dataType: string
1919
}
2020

src/evaluator/value/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ILogger } from '../../logger/types';
44
import { sanitize } from './sanitize';
55
import { ENGINE_VALUE, ENGINE_VALUE_NO_ATTRIBUTES, ENGINE_VALUE_INVALID } from '../../logger/constants';
66

7-
function parseValue(log: ILogger, key: SplitIO.SplitKey, attributeName: string | null, attributes?: SplitIO.Attributes) {
7+
function parseValue(log: ILogger, key: SplitIO.SplitKey, attributeName?: string | null, attributes?: SplitIO.Attributes) {
88
let value = undefined;
99
if (attributeName) {
1010
if (attributes) {

src/sync/polling/updaters/splitChangesUpdater.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function matchFilters(featureFlag: ISplit, filters: ISplitFiltersValidation) {
9090
export function computeMutation<T extends ISplit | IRBSegment>(rules: Array<T>, segments: Set<string>, filters?: ISplitFiltersValidation): ISplitMutations<T> {
9191

9292
return rules.reduce((accum, ruleEntity) => {
93-
if (ruleEntity.status === 'ACTIVE' && (!filters || matchFilters(ruleEntity as ISplit, filters))) {
93+
if (ruleEntity.status !== 'ARCHIVED' && (!filters || matchFilters(ruleEntity as ISplit, filters))) {
9494
accum.added.push(ruleEntity);
9595

9696
parseSegments(ruleEntity).forEach((segmentName: string) => {

0 commit comments

Comments
 (0)