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,16 +13,11 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {SCCreativeWork, SCCreativeWorkWithoutReferences} from '../base/CreativeWork';
import {SCThingMeta} from '../Thing';
import {SCThingMeta, SCThingType} from '../Thing';
import {SCLanguage} from '../types/i18n';
import {SCISO8601Duration} from '../types/Time';
import {SCPersonWithoutReferences} from './Person';
/**
* Type of a video
*/
export type SCVideoType = 'video';
/**
* A video without references
*/
@@ -55,7 +50,7 @@ export interface SCVideoWithoutReferences extends SCCreativeWorkWithoutReference
/**
* Type of an Video
*/
type: SCVideoType;
type: SCThingType.Video;
}
export interface SCVideoSource {
@@ -114,7 +109,7 @@ export interface SCVideo extends SCCreativeWork, SCVideoWithoutReferences {
/**
* Type of a video
*/
type: SCVideoType;
type: SCThingType.Video;
}
export class SCVideoMeta extends SCThingMeta {