From bdd246a44a0ff5f17207b530f21960a909e4ff5f Mon Sep 17 00:00:00 2001 From: Matthew Stratford Date: Sun, 19 Apr 2020 22:47:30 +0100 Subject: [PATCH] Switch "noImplicitAny" to allow wavesurfer plugins. --- src/App.tsx | 2 +- src/api.ts | 2 +- tsconfig.json | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index c6c0e6c..8ba0814 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -46,7 +46,7 @@ const App: React.FC = () => { ) { return ; } else { - var timeslotid = null; + var timeslotid: number | null = null; if ("timeslot_id" in q) { timeslotid = q.timeslot_id; } else if (currentTimeslot.timeslot_id != null) { diff --git a/src/api.ts b/src/api.ts index 56328ba..919c3f7 100644 --- a/src/api.ts +++ b/src/api.ts @@ -12,7 +12,7 @@ export async function apiRequest( params: any, need_auth: boolean = true ): Promise { - let req = null; + var req: Promise| null = null; if (method === "GET") { req = fetch(url + qs.stringify(params, { addQueryPrefix: true }), { credentials: need_auth ? "include" : "omit", diff --git a/tsconfig.json b/tsconfig.json index f2850b7..4dc65a1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,7 +17,8 @@ "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, - "jsx": "react" + "jsx": "react", + "noImplicitAny": false }, "include": [ "src"