From 0097a300613af6f4de18bffa5caeb3dd0ee42cda Mon Sep 17 00:00:00 2001 From: Alessio Caputo <84250128+alessioC42@users.noreply.github.com> Date: Sat, 9 Sep 2023 14:52:15 +0200 Subject: [PATCH] fix TS definition --- SPHclient.d.ts | 11 ----------- SPHclient.js | 4 +++- package.json | 5 ++--- 3 files changed, 5 insertions(+), 15 deletions(-) delete mode 100644 SPHclient.d.ts diff --git a/SPHclient.d.ts b/SPHclient.d.ts deleted file mode 100644 index 1b48208..0000000 --- a/SPHclient.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -declare module 'sphclient' { - export class SPHclient { - constructor(username: string | any, password: string | any, schoolID: number | any, loggingLevel?: number); - authenticate(): Promise; - logout(): Promise; - getVplan(date: Date | any): Promise; // Replace 'any' with your actual Vplan data type - getNextVplanDate(): Promise; - getCalendar(start: Date, end: Date): Promise; // Replace 'any' with your actual calendar data type - } - export default SPHclient; -} diff --git a/SPHclient.js b/SPHclient.js index 1bb6271..6987ffe 100644 --- a/SPHclient.js +++ b/SPHclient.js @@ -1,4 +1,4 @@ -export class SPHclient { +class SPHclient { AJAX_LOGIN_INTERVAL_TIME = 30000; // 30s ajaxInterval; logged_in = false; @@ -264,3 +264,5 @@ export class SPHclient { } } } + +module.exports = SPHclient; diff --git a/package.json b/package.json index 420f5d1..f8c68a5 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,9 @@ "main": "SPHclient.js", "files": [ "SPHclient.js", - "SPHclient.d.ts", - "readme.md" + "readme.md", + "LICENSE" ], - "type": "module", "repository": { "type": "git", "url": "git+https://github.com/alessioC42/SPHclient.git"