From db5298c7fc1b1319be4bde1b2661905a510fed9f Mon Sep 17 00:00:00 2001 From: Anatole Sot <47571181+ano0002@users.noreply.github.com> Date: Mon, 26 Feb 2024 01:34:43 +0100 Subject: [PATCH] Fixed some type invalidity --- server/api/musicbrainz/interfaces.ts | 1 + server/tsconfig.json | 6 ++++-- server/types/nodebrainz.d.ts | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/server/api/musicbrainz/interfaces.ts b/server/api/musicbrainz/interfaces.ts index bc60b9b2b..78b005a84 100644 --- a/server/api/musicbrainz/interfaces.ts +++ b/server/api/musicbrainz/interfaces.ts @@ -283,4 +283,5 @@ export interface SearchOptions { albumname?: string; recordingname?: string; tags?: string[]; + tag?: string; } diff --git a/server/tsconfig.json b/server/tsconfig.json index 2aa9cedf5..bb31d02ca 100644 --- a/server/tsconfig.json +++ b/server/tsconfig.json @@ -4,11 +4,13 @@ "target": "ES2020", "module": "commonjs", "outDir": "../dist", + "strict": true, "noEmit": false, "baseUrl": ".", "paths": { "@server/*": ["*"] - } + }, + "typeRoots": ["../node_modules/*", "./types/*"], }, - "include": ["**/*.ts", "type/**/*.d.ts"] + "include": ["**/*.ts", "**/*.d.ts"] } diff --git a/server/types/nodebrainz.d.ts b/server/types/nodebrainz.d.ts index 16fa99393..b2434aa3d 100644 --- a/server/types/nodebrainz.d.ts +++ b/server/types/nodebrainz.d.ts @@ -6,7 +6,7 @@ declare module 'nodebrainz' { Release, SearchOptions, Work, - } from 'server/api/musicbrainz/interfaces'; + } from '@server/api/musicbrainz/interfaces'; interface RawSearchResponse { created: string; count: number; @@ -87,7 +87,7 @@ declare module 'nodebrainz' { ): Promise; search( type: string, - search: SearchOptions, + search: SearchOptions | { tag: string }, callback: ( err: Error, data: