diff --git a/.eslintrc.js b/.eslintrc.js index 8b72696..4e9b04c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -21,6 +21,10 @@ module.exports = { "ecmaVersion": "latest", "sourceType": "module" }, + "files": [ + "./**/*" + ], "rules": { + "indent": ["error", 4] } } diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..cd47446 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "eslint.format.enable": true, + "eslint.lintTask.enable": true, + "eslint.onIgnoredFiles": "warn" +} \ No newline at end of file diff --git a/database/corpus.ts b/database/corpus.ts new file mode 100644 index 0000000..ff18561 --- /dev/null +++ b/database/corpus.ts @@ -0,0 +1,10 @@ +interface Corpus { + NLC: number; + NLCDESC: string; + NLCDESC16?: string | null; + STANOX?: string | null; + TIPLOC?: string | null; + UIC?: string | null; +} + +export { Corpus } \ No newline at end of file diff --git a/database/pis.ts b/database/pis.ts new file mode 100644 index 0000000..3153296 --- /dev/null +++ b/database/pis.ts @@ -0,0 +1,8 @@ +interface Pis { + code: string; + stops: string[]; + tiplocs: string[]; + operator: string; +} + +export { Pis } \ No newline at end of file diff --git a/database/reasonCode.ts b/database/reasonCode.ts new file mode 100644 index 0000000..d2787b3 --- /dev/null +++ b/database/reasonCode.ts @@ -0,0 +1,7 @@ +interface ReasonCode { + code: string; + lateReason: string; + cancReason: string; +} + +export { ReasonCode } \ No newline at end of file diff --git a/database/station.ts b/database/station.ts new file mode 100644 index 0000000..ed6691f --- /dev/null +++ b/database/station.ts @@ -0,0 +1,8 @@ +interface Station { + STANOX: string; + TIPLOC: string; + "3ALPHA": string; + NLCDESC: string; +} + +export { Station } \ No newline at end of file diff --git a/database/timetable.ts b/database/timetable.ts new file mode 100644 index 0000000..f3d11a6 --- /dev/null +++ b/database/timetable.ts @@ -0,0 +1,24 @@ +interface Stop { + publicDeparture?: string | null; + wttDeparture?: string | null; + publicArrival?: string | null; + wttArrival?: string | null; + isPublic: boolean; + tiploc: string; +} + +interface Service { + transactionType: string; + stpIndicator: string; + operator: string; + trainUid: string; + headcode: string; + powerType: string; + planSpeed: string; + scheduleStartDate: Date; + scheduleEndDate: Date; + daysRun: string[]; + stops: Stop[]; +} + +export { Stop, Service } \ No newline at end of file diff --git a/database/user.ts b/database/user.ts new file mode 100644 index 0000000..223de21 --- /dev/null +++ b/database/user.ts @@ -0,0 +1,7 @@ +interface User { + uuid: string; + domain: string; + atime: Date; +} + +export { User } \ No newline at end of file diff --git a/src/database/timetable.ts b/src/database/timetable.ts deleted file mode 100644 index 8e18784..0000000 --- a/src/database/timetable.ts +++ /dev/null @@ -1,6 +0,0 @@ -interface Stop { - isPublic: boolean, - tiploc: string, -} - -export { Stop } \ No newline at end of file diff --git a/src/index.ts b/src/index.ts deleted file mode 100644 index 371f7f3..0000000 --- a/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -import { Stop } from "./database/timetable" \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index e075f97..6bc9e20 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -55,7 +55,7 @@ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ - // "outDir": "./", /* Specify an output folder for all emitted files. */ + "outDir": "./dist", /* Specify an output folder for all emitted files. */ // "removeComments": true, /* Disable emitting comments. */ // "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */