mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-22 02:33:57 +00:00
refactor(apis/websocket): clean up imports, format, and fix issues
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { existsSync } from 'node:fs'
|
||||
import { resolve as resolvePath } from 'node:path'
|
||||
import { pathToFileURL } from 'node:url'
|
||||
import { existsSync } from 'fs'
|
||||
import { resolve as resolvePath } from 'path'
|
||||
import { pathToFileURL } from 'url'
|
||||
|
||||
const configPath = resolvePath(process.cwd(), 'config.json')
|
||||
|
||||
@@ -17,10 +17,10 @@ const userConfig: Partial<Config> = existsSync(configPath)
|
||||
type BaseTypeOf<T> = T extends (infer U)[]
|
||||
? U[]
|
||||
: T extends (...args: unknown[]) => infer U
|
||||
? (...args: unknown[]) => U
|
||||
: T extends object
|
||||
? { [K in keyof T]: T[K] }
|
||||
: T
|
||||
? (...args: unknown[]) => U
|
||||
: T extends object
|
||||
? { [K in keyof T]: T[K] }
|
||||
: T
|
||||
|
||||
export type Config = Omit<BaseTypeOf<typeof import('../../config.json')>, '$schema'>
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export { default as getConfig } from './getConfig.js'
|
||||
export { default as checkEnvironment } from './checkEnvironment.js'
|
||||
export { default as getConfig } from './getConfig'
|
||||
export { default as checkEnvironment } from './checkEnvironment'
|
||||
|
||||
Reference in New Issue
Block a user