]> git.codecow.com Git - nano-pow.git/commitdiff
Move API support types to config file that uses it and remove redundant type.
authorChris Duncan <chris@zoso.dev>
Sun, 29 Jun 2025 07:35:17 +0000 (00:35 -0700)
committerChris Duncan <chris@zoso.dev>
Sun, 29 Jun 2025 07:35:17 +0000 (00:35 -0700)
src/lib/config/index.ts
src/types.d.ts

index 5eb766723db4831d1d36c8d577a8684407584fea..482b6dc5eb9a8f5587c64005daf5f9c20a45d318 100644 (file)
@@ -1,9 +1,11 @@
 //! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
 //! 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
index 6f039cd5b1bdd34fbd02c9485190aa4f97b89c6b..cc6e50fd4ec9a7a48e27d05d0156953e8832314f 100644 (file)
@@ -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.