magicrealmsshared 0.0.1 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magicrealmsshared",
3
- "version": "0.0.1",
3
+ "version": "0.1.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -8,5 +8,9 @@
8
8
  },
9
9
  "keywords": [],
10
10
  "author": "",
11
- "license": "CC BY-NC-ND"
11
+ "license": "CC BY-NC-ND",
12
+ "devDependencies": {
13
+ "@types/mongodb": "^4.0.6",
14
+ "@types/geojson": "^7946.0.15"
15
+ }
12
16
  }
package/tsconfig.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "module": "commonjs",
5
+ "strict": true,
6
+ "moduleResolution": "node",
7
+ "esModuleInterop": true,
8
+ "skipLibCheck": true
9
+ }
10
+ }
package/types/types.ts ADDED
@@ -0,0 +1,19 @@
1
+ import { ObjectId } from "mongodb"
2
+
3
+
4
+ //#region Base Types
5
+ type ObjectWithId<T> = {
6
+ _id: T
7
+ }
8
+
9
+ type WorldObject<T> = ObjectWithId<T> & {
10
+ pos: GeoJSON.Point;
11
+ }
12
+ //#endregion
13
+
14
+ export type Well_Client = Well<string>;
15
+ export type Well_Server = Well<ObjectId>;
16
+ export type Well<T> = WorldObject<T> & {
17
+ name: string,
18
+ color: number,
19
+ };
package/types/well.ts DELETED
@@ -1,3 +0,0 @@
1
- export type Well = {
2
-
3
- };