refactor: refactor SCThingTypes from union-type to enum. SCThingType-type-attributes are now string-type-attributes.

This commit is contained in:
Michel Jonathan Schmitz
2018-12-05 18:51:28 +01:00
parent 641eff15b8
commit f9056eeb33
25 changed files with 134 additions and 192 deletions

View File

@@ -13,14 +13,9 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {SCThingInPlace} from '../base/ThingInPlace';
import {SCThing, SCThingMeta} from '../Thing';
import {SCThing, SCThingMeta, SCThingType} from '../Thing';
import {SCISO8601Duration} from '../types/Time';
/**
* Type of a ticket
*/
export type SCTicketType = 'ticket';
/**
* A ticket without references
*/
@@ -43,7 +38,7 @@ export interface SCTicketWithoutReferences extends SCThing {
/**
* Type of a ticket
*/
type: SCTicketType;
type: SCThingType.Ticket;
}
/**
@@ -53,7 +48,7 @@ export interface SCTicket extends SCTicketWithoutReferences, SCThingInPlace {
/**
* Type of a ticket
*/
type: SCTicketType;
type: SCThingType.Ticket;
}
/**