mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 09:03:02 +00:00
feat: make SCContactPoint extend SCThing
Refactor SCPerson and SCOrganization
This commit is contained in:
@@ -19,6 +19,7 @@ import {SCArticle, SCArticleWithoutReferences} from '../src/things/article';
|
||||
import {SCBook, SCBookWithoutReferences} from '../src/things/book';
|
||||
import {SCBuilding, SCBuildingWithoutReferences} from '../src/things/building';
|
||||
import {SCCatalog, SCCatalogWithoutReferences} from '../src/things/catalog';
|
||||
import {SCContactPoint, SCContactPointWithoutReferences} from '../src/things/contact-point';
|
||||
import {SCCourseOfStudies, SCCourseOfStudiesWithoutReferences} from '../src/things/course-of-studies';
|
||||
import {SCDateSeries, SCDateSeriesWithoutReferences} from '../src/things/date-series';
|
||||
import {SCDiff, SCDiffWithoutReferences} from '../src/things/diff';
|
||||
@@ -126,6 +127,17 @@ assert<Has<SCBuildingPropertyTypes, SCThing>>(false);
|
||||
assert<Extends<SCBuildingWithoutReferences, SCThing>>(false);
|
||||
assert<Extends<SCBuilding, SCThing>>(true);
|
||||
|
||||
/**
|
||||
* Types of properties of SCContactPoint
|
||||
*/
|
||||
type SCContactPointPropertyTypes = PropertyTypesNested<SCContactPoint>;
|
||||
assert<NotHas<SCContactPointPropertyTypes, SCThingWithoutReferences>>(false);
|
||||
assert<Has<SCContactPointPropertyTypes, SCThingWithoutReferences>>(true);
|
||||
assert<NotHas<SCContactPointPropertyTypes, SCThing>>(true);
|
||||
assert<Has<SCContactPointPropertyTypes, SCThing>>(false);
|
||||
assert<Extends<SCContactPointWithoutReferences, SCThing>>(false);
|
||||
assert<Extends<SCContactPoint, SCThing>>(true);
|
||||
|
||||
/**
|
||||
* Types of properties of SCCatalog
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user