From 547119917f23ea86421b562a76d0ebbb52beb7c8 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Sun, 29 Jun 2025 00:35:17 -0700 Subject: [PATCH] Move API support types to config file that uses it and remove redundant type. --- src/lib/config/index.ts | 4 +++- src/types.d.ts | 14 -------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/lib/config/index.ts b/src/lib/config/index.ts index 5eb7667..482b6dc 100644 --- a/src/lib/config/index.ts +++ b/src/lib/config/index.ts @@ -1,9 +1,11 @@ //! SPDX-FileCopyrightText: 2025 Chris Duncan //! SPDX-License-Identifier: GPL-3.0-or-later -import { ApiSupportedTypes, NanoPowOptions } from '#types' +import { NanoPowOptions } from '#types' import { ApiSupport, bigintFrom, bigintToHex, SEND } from '#utils' +type ApiSupportedTypes = keyof typeof ApiSupport + class NanoPowConfigConstructor implements NanoPowOptions { static #isInternal: boolean = false api: ApiSupportedTypes diff --git a/src/types.d.ts b/src/types.d.ts index 6f039cd..cc6e50f 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -7,20 +7,6 @@ declare global { } } -export declare const ApiSupported: { - cpu: boolean - wasm: { - isSupported: boolean - } - webgl: { - isSupported: boolean - } - webgpu: { - isSupported: boolean - } -} -export type ApiSupportedTypes = keyof typeof ApiSupported - export declare class NanoPow { /** * Finds a nonce that satisfies the Nano proof-of-work requirements. -- 2.47.3