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

@@ -14,12 +14,7 @@
*/
import {SCAcademicTermWithoutReferences} from '../base/AcademicTerm';
import {SCThingWithCategoriesSpecificValues, SCThingWithCategoriesWithoutReferences} from '../base/ThingWithCategories';
import {SCThingMeta} from '../Thing';
/**
* Type of a catalog
*/
export type SCCatalogType = 'catalog';
import {SCThingMeta, SCThingType} from '../Thing';
/**
* A catalog without references
@@ -37,7 +32,7 @@ export interface SCCatalogWithoutReferences
/**
* Type of a catalog
*/
type: SCCatalogType;
type: SCThingType.Catalog;
}
/**
@@ -58,6 +53,11 @@ export interface SCCatalog extends SCCatalogWithoutReferences {
* An array of catalogs from the 'level 0' (root) catalog to the direct parent
*/
superCatalogs?: SCCatalogWithoutReferences[];
/**
* Type of a catalog
*/
type: SCThingType.Catalog;
}
/**