Adam Shaw 7 лет назад
Родитель
Сommit
d15b7eb367
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/validation.ts

+ 2 - 2
src/validation.ts

@@ -11,7 +11,7 @@ import { EventInput } from './structs/event'
 
 // TODO: rename to "criteria" ?
 export type ConstraintInput = 'businessHours' | string | EventInput | EventInput[]
-export type Constraint = 'businessHours' | string | EventStore
+export type Constraint = 'businessHours' | string | EventStore | false // false means won't pass at all
 export type OverlapFunc = ((stillEvent: EventApi, movingEvent: EventApi | null) => boolean)
 export type AllowFunc = (span: DateSpanApi, movingEvent: EventApi | null) => boolean
 
@@ -296,7 +296,7 @@ function constraintToRanges(
     )
   }
 
-  return []
+  return [] // if it's false
 }
 
 // TODO: move to event-store file?