Files
NapCatQQ/packages/napcat-types/external-shims.d.ts
T
TanTan f954252a34
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
Release Tag / validate-version (push) Waiting to run
NapCatQQ source snapshot
2026-11-13 09:01:47 +08:00

105 lines
2.6 KiB
TypeScript

// 外部模块 shim,提供最小的可运行值和类型,避免类型包依赖外部环境
// node:* 模块移除 mock,使用系统自带类型
// (ws/express/winston) now provided by real type deps (@types/ws, @types/express, winston)
declare module 'ffmpeg-static' {
const _ffmpeg_static_default: any;
export default _ffmpeg_static_default;
}
declare module 'fluent-ffmpeg' {
const _fluent_ffmpeg_default: any;
export default _fluent_ffmpeg_default;
}
declare module 'sharp' {
const _sharp_default: any;
export default _sharp_default;
}
declare module 'uuid' {
export function v4 (...args: any[]): string;
}
declare module 'axios' {
const _axios_default: any;
export default _axios_default;
}
declare module 'body-parser' {
const _body_parser_default: any;
export default _body_parser_default;
}
declare module 'cors' {
const _cors_default: any;
export default _cors_default;
}
declare module 'file-type' {
export function fileTypeFromFile (path: string): Promise<any>;
}
declare module 'image-size' {
const _image_size_default: any;
export default _image_size_default;
}
declare module 'jimp' {
const _jimp_default: any;
export default _jimp_default;
}
declare module 'qrcode' {
const _qrcode_default: any;
export default _qrcode_default;
}
declare module 'yaml' {
export const parse: (...args: any[]) => any;
export const stringify: (...args: any[]) => any;
}
declare module 'napcat-protobuf' {
export class NapProtoMsg<T = any> {
constructor (schema: any);
decode (buffer: any): T;
encode (value: any): Uint8Array;
}
export function ProtoField (...args: any[]): any;
export type NapProtoEncodeStructType<_T> = any;
export type NapProtoDecodeStructType<_T> = any;
export type ScalarProtoFieldType<_T> = any;
export type MessageProtoFieldType<_T> = any;
export const ScalarType: {
STRING: any;
INT64: any;
INT32: any;
UINT32: any;
UINT64: any;
BYTES: any;
BOOL: any;
[key: string]: any;
};
}
declare module 'inversify' {
export class Container {
bind: (...args: any[]) => any;
get: <T = any>(id: any) => T;
}
export function injectable (...args: any[]): any;
export function inject (...args: any[]): any;
export interface ServiceIdentifier<_T = any> { }
const _inversify_default: any;
export default _inversify_default;
}
declare module 'ip' {
export function toBuffer (ip: any, buffer?: Buffer, offset?: number): Buffer;
export function toString (buffer: any, offset?: number, length?: number): string;
const _ip_default: any;
export default _ip_default;
}