Miao-Yunzai/src/global.d.ts

90 lines
1.8 KiB
TypeScript
Raw Normal View History

2024-06-09 01:00:07 +08:00
import { segment as se } from 'icqq'
import { RedisClientType } from 'redis'
2024-06-12 09:21:55 +08:00
import { Client, plugin as p } from './core/index.js'
2024-06-11 17:41:11 +08:00
import chalk, { type ChalkInstance } from 'chalk'
2024-06-13 21:01:16 +08:00
import Ren from './utils/renderer/Renderer.js'
2024-06-11 17:41:11 +08:00
2024-06-09 12:31:15 +08:00
/**
2024-06-11 17:41:11 +08:00
*
2024-06-09 12:31:15 +08:00
*/
2024-06-11 17:41:11 +08:00
type LogType = string | Error | unknown
/**
*
*/
type LoggerType = {
trace(...arg: LogType[]): any
debug(...arg: LogType[]): any
info(...arg: LogType[]): any
warn(...arg: LogType[]): any
error(...arg: LogType[]): any
fatal(...arg: LogType[]): any
mark(...arg: LogType[]): any
}
/**
* @deprecated 使
*/
type ChalkInstanceType = {
/**
* @deprecated 使
*/
red: ChalkInstance.red
/**
* @deprecated 使
*/
green: ChalkInstance.green
/**
* @deprecated 使
*/
blue: ChalkInstance.blue
/**
* @deprecated 使
*/
yellow: ChalkInstance.yellow
/**
* @deprecated 使
*/
magenta: ChalkInstance.magenta
/**
* @deprecated 使
*/
cyan: ChalkInstance.cyan
}
2024-06-09 01:00:07 +08:00
declare global {
2024-06-11 17:41:11 +08:00
/**
2024-06-12 09:35:17 +08:00
* import { Redis } from 'yunzai/core'
2024-06-11 19:45:04 +08:00
* @deprecated 使
2024-06-11 17:41:11 +08:00
*/
2024-06-09 12:33:03 +08:00
var redis: RedisClientType
2024-06-11 17:41:11 +08:00
/**
2024-06-12 09:35:17 +08:00
* import { Bot } from 'yunzai/core'
2024-06-11 19:45:04 +08:00
* @deprecated 使
2024-06-11 17:41:11 +08:00
*/
2024-06-12 09:21:55 +08:00
var Bot: typeof Client.prototype
2024-06-11 17:41:11 +08:00
/**
2024-06-12 09:47:21 +08:00
* import { Segment } from 'yunzai/core'
2024-06-11 19:45:04 +08:00
* @deprecated 使
2024-06-11 17:41:11 +08:00
*/
2024-06-09 12:33:03 +08:00
var segment: typeof se
2024-06-11 17:41:11 +08:00
/**
2024-06-12 09:47:21 +08:00
* import { Plugin } from 'yunzai/core'
2024-06-11 19:45:04 +08:00
* @deprecated 使
2024-06-11 17:41:11 +08:00
*/
2024-06-09 23:02:31 +08:00
var plugin: typeof p
2024-06-11 19:45:04 +08:00
/**
*
* 使 logger.chalk
*/
2024-06-11 17:41:11 +08:00
var logger: LoggerType &
ChalkInstanceType & {
chalk: ChalkInstance
}
2024-06-13 21:01:16 +08:00
/**
*
* @deprecated 使
*/
var Renderer: typeof Ren
2024-06-09 12:31:39 +08:00
}