Files
NapCatQQ/.pnpm-store/v3/files/db/0c3c4264c0fdb6700e211d122bee61e0bf6e9b8a05257dd598bdae9a4a70514dc25df659f315fdefd2feaeb22f3c2de839d06739d6bad259862ec6915847a9
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

36 lines
931 B
Plaintext

/**
* ASN1 type
*/
import * as asn1js from "asn1js";
export interface IEmptyConstructor<T = unknown> {
new (): T;
}
/**
* Allows to convert ASN.1 object to JS value and back
*/
export interface IAsnConverter<T = unknown, AsnType = asn1js.AsnType> {
/**
* Returns JS value from ASN.1 object
* @param value ASN.1 object from asn1js module
*/
fromASN(value: AsnType): T;
/**
* Returns ASN.1 object from JS value
* @param value JS value
*/
toASN(value: T): AsnType;
}
export type IntegerConverterType = string | number;
export type AnyConverterType = ArrayBuffer | null;
/**
* Allows an object to control its own ASN.1 serialization and deserialization
*/
export interface IAsnConvertible<T = asn1js.AsnType> {
fromASN(asn: T): this;
toASN(): T;
toSchema(name: string): asn1js.BaseBlock;
}
export interface IAsnConvertibleConstructor {
new (): IAsnConvertible;
}