From 8b943cc97fab890085448122e7c13dd035d0e238 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Wed, 20 Dec 2023 00:47:15 -0500 Subject: JSON validation (#394) * Set up JSON testing * Add schema validation * Use parseJson * Finish types * Disambiguate ext/json-schema from node dependency with the same name * Add support for specifying the jsconfig file * Don't expose types * Update types * Use dictionary map type * Fix types * Fix AJV warnings * Move types * Move anb rename file * Move common mocks * Simplify types --- types/dev/manifest.d.ts | 2 +- types/dev/vm.d.ts | 38 -------------------------------------- 2 files changed, 1 insertion(+), 39 deletions(-) delete mode 100644 types/dev/vm.d.ts (limited to 'types/dev') diff --git a/types/dev/manifest.d.ts b/types/dev/manifest.d.ts index e455208f..af475ee9 100644 --- a/types/dev/manifest.d.ts +++ b/types/dev/manifest.d.ts @@ -30,7 +30,7 @@ export type ManifestVariant = { fileName?: string; fileCopies?: string[]; excludeFiles?: string[]; - modifications: Modification[]; + modifications?: Modification[]; }; export type Modification = ( diff --git a/types/dev/vm.d.ts b/types/dev/vm.d.ts deleted file mode 100644 index 3eb0949f..00000000 --- a/types/dev/vm.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2023 Yomitan Authors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -import type * as Translation from '../ext/translation'; - -export type PseudoChrome = { - runtime: { - getURL(path: string): string; - }; -}; - -export type PseudoFetchResponse = { - ok: boolean; - status: number; - statusText: string; - text(): Promise; - json(): Promise; -}; - -export type OptionsPresetObject = { - [key: string]: OptionsPreset; -}; - -export type OptionsPreset = Partial; -- cgit v1.2.3