mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 00:52:55 +00:00
refactor: extract inline type definitions
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Point, Polygon} from 'geojson';
|
||||
import {SCThing} from '../Thing';
|
||||
import {SCGeoInformation} from '../types/GeoInformation';
|
||||
import {SCPostalAddress} from '../types/PostalAddress';
|
||||
|
||||
/**
|
||||
@@ -26,15 +26,12 @@ export interface SCPlaceWithoutReferences extends SCThing {
|
||||
address?: SCPostalAddress;
|
||||
|
||||
/**
|
||||
* Position/shape of the place
|
||||
* Positional information of the place
|
||||
*
|
||||
* !!! BEWARE !!!
|
||||
* Can not be a GeometryCollection because ElasticSearch does not allow distance filtering/sorting on other types
|
||||
*/
|
||||
geo: {
|
||||
point: Point,
|
||||
polygon?: Polygon,
|
||||
};
|
||||
geo: SCGeoInformation;
|
||||
|
||||
/**
|
||||
* Opening hours of the place
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
*/
|
||||
import {SCThing, SCThingTranslatableProperties} from '../Thing';
|
||||
import {SCTranslations} from '../types/i18n';
|
||||
import {SCMap} from '../types/Map';
|
||||
|
||||
/**
|
||||
* A thing without references with categories
|
||||
@@ -33,13 +34,8 @@ export interface SCThingWithCategoriesWithoutReferences<T,
|
||||
* Use this to explicitly override general opening hours brought in scope by openingHoursSpecification or openingHours
|
||||
*
|
||||
* A map from categories to their specific values.
|
||||
*
|
||||
* !!! BEWARE !!!
|
||||
* TypeScript does not allow generics as index signatures. The properties of the map should exist in `T`.
|
||||
*/
|
||||
categorySpecificValues?: {
|
||||
[s: string]: U,
|
||||
};
|
||||
categorySpecificValues?: SCMap<U>;
|
||||
|
||||
/**
|
||||
* Translated fields of a thing with categories
|
||||
|
||||
Reference in New Issue
Block a user