mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-03 03:52:52 +00:00
65 lines
1.3 KiB
TypeScript
65 lines
1.3 KiB
TypeScript
/*
|
|
* Copyright (C) 2021 StApps
|
|
* This program is free software: you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License as published by the Free
|
|
* Software Foundation, version 3.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
* more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along with
|
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
import {SCISO8601Date} from '../../general/time';
|
|
|
|
/**
|
|
* Date Range
|
|
*
|
|
* CAUTION: Changing the name requires changes in the core-tools premaps
|
|
*/
|
|
export type SCISO8601DateRange = SCRange<SCISO8601Date>;
|
|
|
|
/**
|
|
* Generic range type
|
|
*/
|
|
export type SCRange<T> = {
|
|
/**
|
|
* Greater than value
|
|
*/
|
|
gt?: never;
|
|
|
|
/**
|
|
* Greater or equal to value
|
|
*/
|
|
gte?: T;
|
|
|
|
/**
|
|
* Greater than value
|
|
*/
|
|
lt?: never;
|
|
|
|
/**
|
|
* Greater or equal to value
|
|
*/
|
|
lte?: T;
|
|
} | {
|
|
// tslint:disable:completed-docs
|
|
gt?: T;
|
|
gte?: never;
|
|
lt?: T;
|
|
lte?: never;
|
|
} | {
|
|
gt?: T;
|
|
gte?: never;
|
|
lt?: never;
|
|
lte?: T;
|
|
} | {
|
|
gt?: never;
|
|
gte?: T;
|
|
lt?: T;
|
|
lte?: never;
|
|
// tslint:enable:completed-docs
|
|
};
|