Skip to content

Commit

Permalink
try using npm package @types/geojson, schema build fails
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed Oct 24, 2023
1 parent 9bee7ec commit 43b7cec
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 9 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"author": "Open Systems Lab",
"license": "MPL2",
"devDependencies": {
"@types/geojson": "^7946.0.12",
"@types/node": "18.16.1",
"gts": "^5.0.0",
"husky": "^8.0.0",
Expand Down
7 changes: 7 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions types/enums/ProjectTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Values of `data.proposal.projectType`
*/
export const ProjectTypes = {
alter: 'Alter a building',
'alter.balcony': 'Add or alter a balcony',
'alter.bayWindow': 'Add or remove a bay window',
'alter.bayWindow.add': 'Add a bay window',
Expand Down Expand Up @@ -124,7 +125,7 @@ export const ProjectTypes = {
'alter.swimmingPool.indoor': 'Install an indoor swimming pool',
'alter.swimmingPool.outdoor': 'Install an outdoor swimming pool',
'alter.trees': 'Changes to trees or hedges',
changeOfUse: 'Convert a building to a different use',
changeOfUse: 'Change the use of a building',
'changeofUse.annexe':
'Convert part of the property into a granny flat (residential annexe)',
'changeOfUse.caravans': 'Use a caravan or mobile home on the property',
Expand All @@ -143,6 +144,7 @@ export const ProjectTypes = {
'demolish.outbuildings': 'Demolish an outbuilding (such as a garage or barn)',
'demolish.part': 'Demolish part of a building (such as an extension)',
'demolish.replace': 'Demolish a building and build homes in its place',
extend: 'Extend a building or add an outbuilding',
'extend.basement': 'Add a basement extension',
'extend.basement.extend': 'Enlarge a basement',
'extend.basement.lightwell': 'Add a lightwell',
Expand Down Expand Up @@ -197,7 +199,7 @@ export const ProjectTypes = {
'internal.staircases': 'Alter internal staircases',
'internal.walls': 'Alter internal walls',
'internal.windows.openings': 'Alter internal window openings',
new: 'Another type of building',
new: 'Add another type of building',
'new.agriculture': 'Agricultural buildings',
'new.agriculture.glassHouse': 'Agricultural buildings - glass house',
'new.agriculture.mining': 'Agricultural buildings - mining',
Expand All @@ -217,6 +219,7 @@ export const ProjectTypes = {
'new.temporaryStructure':
'Erect a temporary structure for historic visitor attractions and listed buildings',
'new.warehouse': 'Storage or distribution premises',
unit: 'Change of units',
'unit.merge': 'Convert two or more properties into one',
'unit.subdivide': 'Convert a home or part of a home into flats',
};
3 changes: 2 additions & 1 deletion types/schema/data/Property.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {GeoJSON} from 'geojson';
import {PlanningConstraints} from '../../enums/PlanningConstraints';
import {PropertyTypes} from '../../enums/PropertyTypes';
import {Area, GeoJSON, URL} from '../../utils';
import {Area, URL} from '../../utils';

/**
* @id #Property
Expand Down
3 changes: 2 additions & 1 deletion types/schema/data/Proposal.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {GeoJSON} from 'geojson';
import {ProjectTypes} from '../../enums/ProjectTypes';
import {VehicleParking} from '../../enums/VehicleParking';
import {Area, Date, GeoJSON} from '../../utils';
import {Area, Date} from '../../utils';

/**
* @id #Proposal
Expand Down
5 changes: 0 additions & 5 deletions types/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ export type DateTime = string;
*/
export type Date = string;

/**
* @id #GeoJSON
*/
export type GeoJSON = Record<string, any>;

/**
* @id #Area
*/
Expand Down

0 comments on commit 43b7cec

Please sign in to comment.