Skip to content

Commit 2948bb9

Browse files
committed
fix: type errors, package.json
1 parent f30df88 commit 2948bb9

File tree

5 files changed

+21
-12
lines changed

5 files changed

+21
-12
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
./.idea
1+
node_modules
2+
./.idea
3+
index.d.ts
4+
index.js

index.d.ts renamed to index.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export type GeofenceId = FeatureId
6161
export type KioskId = FeatureId
6262
export type LevelId = FeatureId
6363
export type OccupantId = FeatureId
64+
export type OpeningId = FeatureId
6465
export type RelationshipId = FeatureId
6566
export type SectionId = FeatureId
6667
export type UnitId = FeatureId
@@ -75,7 +76,7 @@ export type FeatureProperties = {};
7576
* Provide a better default value for GeoJsonFeature (Feature in geojson).
7677
* This makes the type Feature to be used in generic types much easier.
7778
*/
78-
export interface Feature<P extends FeatureProperties> extends GeoJsonFeature<Geometry | null, FeatureProperties> {
79+
export interface Feature<P extends FeatureProperties = FeatureProperties> extends GeoJsonFeature<Geometry | null, P> {
7980
feature_type: string
8081
}
8182

@@ -249,7 +250,7 @@ export interface KioskProperties extends NamedFeatureProperties {
249250
* Kiosk object
250251
* https://docs.ogc.org/cs/20-094/kiosk/index.html
251252
*/
252-
export interface Kiosk extends NamedFeature<LevelProperties> {
253+
export interface Kiosk extends NamedFeature<KioskProperties> {
253254
id: KioskId,
254255
feature_type: FeatureType.kiosk,
255256
geometry: Polygonal,
@@ -384,7 +385,7 @@ export interface Unit extends LabeledFeature<UnitProperties> {
384385
* Venue object
385386
* https://docs.ogc.org/cs/20-094/Venue/index.html
386387
*/
387-
export interface Venue extends LabeledFeature {
388+
export interface Venue extends NamedFeature {
388389
id: VenueId,
389390
feature_type: FeatureType.venue,
390391
geometry: Polygonal,
@@ -1876,7 +1877,7 @@ export enum RELATIONSHIP_CATEGORY {
18761877
"ramp"="ramp",
18771878
"stairs"="stairs",
18781879
"traversal"="traversal",
1879-
"traversal.path"="traversal"
1880+
"traversal.path"="traversal.path"
18801881
}
18811882

18821883
/**
@@ -1932,7 +1933,7 @@ export enum SECTION_CATEGORY {
19321933
"gatearea.holding"="gatearea.holding",
19331934
immigration="immigration",
19341935
"immigration.schengen"="immigration.schengen",
1935-
information=information,
1936+
information='information',
19361937
paidarea="paidarea",
19371938
parkandride="parkandride",
19381939
parking="parking",
@@ -2029,7 +2030,7 @@ export enum UNIT_CATEGORY {
20292030
waitingroom="waitingroom",
20302031
walkway="walkway",
20312032
"walkway.island"="walkway.island",
2032-
wood=wood
2033+
wood='wood'
20332034
}
20342035

20352036
/**

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22
"name": "imdf-typescript",
33
"version": "1.0.8",
44
"description": "Typescript definitions for IMDF https://docs.ogc.org/cs/20-094/index.html",
5-
"main": "index.d.ts",
5+
"main": "index.js",
6+
"source": "index.ts",
7+
"types": "index.d.ts",
68
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
9+
"test": "echo \"Error: no test specified\" && exit 1",
10+
"prepare": "npm run build",
11+
"build": "tsc"
812
},
913
"repository": {
1014
"type": "git",

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696

9797
/* Completeness */
9898
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
99-
"skipLibCheck": true /* Skip type checking all .d.ts files. */
99+
"skipLibCheck": true, /* Skip type checking all .d.ts files. */
100+
"declaration": true
100101
}
101102
}

0 commit comments

Comments
 (0)