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 {SCThingsWithoutDiff} from '../Classes';
import {SCThing, SCThingMeta} from '../Thing';
import {SCThing, SCThingMeta, SCThingType} from '../Thing';
import {SCISO8601Date} from '../types/Time';
/**
* Type of a diff
*/
export type SCDiffType = 'diff';
/**
* A diff without references
*/
@@ -43,7 +38,7 @@ export interface SCDiffWithoutReferences extends SCThing {
/**
* Type of a diff
*/
type: SCDiffType;
type: SCThingType.Diff;
}
/**
@@ -54,6 +49,11 @@ export interface SCDiff extends SCDiffWithoutReferences {
* Original object the diff was generated on
*/
object: SCThingsWithoutDiff;
/**
* Type of a diff
*/
type: SCThingType.Diff;
}
/**