Skip to content

Commit

Permalink
file update~
Browse files Browse the repository at this point in the history
  • Loading branch information
Taromatibot committed Jan 2, 2024
1 parent 6d8bd96 commit 2cb88bc
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 102 deletions.
68 changes: 34 additions & 34 deletions dist/cn/jsstp.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* 拓展object,提供一些简单且遍历的操作
*/
declare class info_object<key_T=PropertyKey,value_T=any> {
declare class info_object<key_T = PropertyKey, value_T = any> {
/**
* @description 获取所有key的数组
*/
Expand All @@ -22,17 +22,17 @@ declare class info_object<key_T=PropertyKey,value_T=any> {
* @description 对每个key-value对执行某个函数
* @param {(value,key?)} func 要执行的函数,若返回值不为undefined,则会替换原value
*/
/*@__PURE__*/forEach(func: (value: value_T, key?: key_T) => value_T|undefined): void;
/*@__PURE__*/forEach(func: (value: value_T, key?: key_T) => value_T | undefined): void;
/**
* @description 复制一个新的对象
* @returns {info_object} 复制的对象
*/
/*@__PURE__*/get trivial_clone(): info_object<key_T,value_T>;
/*@__PURE__*/get trivial_clone(): info_object<key_T, value_T>;
/**
* @description 遍历自身和子对象并返回一个由遍历结果构成的一维数组
* @param {(dimensions[...],value):any} func 要执行的函数,返回值将被添加到数组中
*/
/*@__PURE__*/flat_map<T>(func: (...dimensions_with_value_in_last: [...key_T[],value_T]) => T): T[];
/*@__PURE__*/flat_map<T>(func: (...dimensions_with_value_in_last: [...key_T[], value_T]) => T): T[];
/**
* @description 遍历自身并返回一个由遍历结果构成的一维数组
* @param {(value,key?):any} func 要执行的函数,返回值将被添加到数组中
Expand All @@ -42,7 +42,7 @@ declare class info_object<key_T=PropertyKey,value_T=any> {
* @description 对自身按照数组追加元素
* @param {[undefined|[key_T,value_T]]} array 要追加的数组
*/
/*@__PURE__*/push(array: [undefined|[key_T, value_T]]): void;
/*@__PURE__*/push(array: [undefined | [key_T, value_T]]): void;
}

/**
Expand All @@ -53,7 +53,7 @@ declare class info_object<key_T=PropertyKey,value_T=any> {
* console.log(info.Option);//notranslate
* @alias jsstp.base_sstp_info_t
*/
declare class base_sstp_info_t<key_T=PropertyKey,value_T=any> extends info_object<key_T,value_T> {
declare class base_sstp_info_t<key_T = PropertyKey, value_T = any> extends info_object<key_T, value_T> {
/**
* 自拆分好的字符串报文或对象报文构造sstp_info_t,不建议直接使用
* @param {String} info_head 报文头
Expand Down Expand Up @@ -93,7 +93,7 @@ declare class base_sstp_info_t<key_T=PropertyKey,value_T=any> extends info_objec
* 其他报文成员
* @type {any|undefined}
*/
[key: string]: any|undefined;
[key: string]: any | undefined;
}

/**
Expand All @@ -104,7 +104,7 @@ declare class base_sstp_info_t<key_T=PropertyKey,value_T=any> extends info_objec
* console.log(info.Option);//notranslate
* @alias jsstp.sstp_info_t
*/
declare class sstp_info_t extends base_sstp_info_t<string,string> {
declare class sstp_info_t extends base_sstp_info_t<string, string> {
/**
* 从字符串构造sstp_info_t
* @param {String} str 字符串报文
Expand Down Expand Up @@ -155,7 +155,7 @@ declare class sstp_info_t extends base_sstp_info_t<string,string> {
* }
* @see {@link http://ssp.shillest.net/ukadoc/manual/spec_fmo_mutex.html}
*/
declare interface single_fmo_info_t extends info_object<string,string> {
declare interface single_fmo_info_t extends info_object<string, string> {
/**
* @description 正在运行的基础软件根文件夹的完整路径
* @example E:\ssp\
Expand Down Expand Up @@ -223,7 +223,7 @@ declare interface single_fmo_info_t extends info_object<string,string> {
* @see {@link jsstp_t.get_fmo_infos}
* @see {@link http://ssp.shillest.net/ukadoc/manual/spec_fmo_mutex.html}
*/
declare class fmo_info_t extends base_sstp_info_t<string,single_fmo_info_t> {
declare class fmo_info_t extends base_sstp_info_t<string, single_fmo_info_t> {
/**
* 自字符串构造fmo_info_t
* @param {String} fmo_text
Expand Down Expand Up @@ -262,7 +262,7 @@ declare class fmo_info_t extends base_sstp_info_t<string,single_fmo_info_t> {
* fmo成员
* @type {single_fmo_info_t|undefined}
*/
[uuid: string]: single_fmo_info_t|undefined;
[uuid: string]: single_fmo_info_t | undefined;
}

/**
Expand All @@ -273,7 +273,7 @@ declare class fmo_info_t extends base_sstp_info_t<string,single_fmo_info_t> {
* console.log(name);
* @alias jsstp.list_info_t
*/
declare class list_info_t extends base_sstp_info_t<number,string> {
declare class list_info_t extends base_sstp_info_t<number, string> {
/**
* 自字符串构造list_info_t
* @param {String} list_text
Expand Down Expand Up @@ -302,13 +302,13 @@ declare class list_info_t extends base_sstp_info_t<number,string> {
* 数组成员
* @type {string|undefined}
*/
[uuid: number]: string|undefined;
[uuid: number]: string | undefined;
}

/**
* 一个可用函数初始化的可扩展的函数类型,用于更为可读的派生类函数类型
*/
declare class ExtensibleFunction<args_T extends Array<any>,return_T> extends Function {
declare class ExtensibleFunction<args_T extends Array<any>, return_T> extends Function {
/**
* 自函数实例初始化
* @param {Function} func
Expand Down Expand Up @@ -361,18 +361,18 @@ type security_level_t = "local" | "external";
* sstp方法调用器
* @group callers
*/
interface method_caller<T=sstp_info_t, Rest extends any[]=[Object]> {
interface method_caller<T = sstp_info_t, Rest extends any[] = [Object]> {
(...args: Rest): Promise<T>;
get_raw(...args: Rest): Promise<String>;
with_type<nT>(result_type: new (str:string) => nT): method_caller<nT, Rest>;
with_type<nT>(result_type: new (str: string) => nT): method_caller<nT, Rest>;
bind_args_processor<nRest extends any[]>(processor: (...args: Rest) => Object): method_caller<T, nRest>;
}

/**
* 可以通过成员访问扩充指定key值的拓展调用器
* @group callers
*/
interface base_keyed_method_caller<T=sstp_info_t, Rest extends any[]=[Object]> extends method_caller<T, Rest> {
interface base_keyed_method_caller<T = sstp_info_t, Rest extends any[] = [Object]> extends method_caller<T, Rest> {
/**
* 扩展调用器
*/
Expand All @@ -382,7 +382,7 @@ interface base_keyed_method_caller<T=sstp_info_t, Rest extends any[]=[Object]> e
* 对调用参数进行简易处理的可扩展调用器
* @group callers
*/
interface simple_keyed_method_caller<result_T> extends base_keyed_method_caller<result_T, any[]> {}
interface simple_keyed_method_caller<result_T> extends base_keyed_method_caller<result_T, any[]> { }
/**
* 简易事件调用器
* 直接调用以触发事件!
Expand All @@ -396,7 +396,7 @@ interface simple_keyed_method_caller<result_T> extends base_keyed_method_caller<
* });
* @group callers
*/
interface simple_event_caller extends simple_keyed_method_caller<sstp_info_t> {}
interface simple_event_caller extends simple_keyed_method_caller<sstp_info_t> { }
/**
* 简易命令调用器
* @example
Expand All @@ -409,7 +409,7 @@ interface simple_event_caller extends simple_keyed_method_caller<sstp_info_t> {}
* });
* @group callers
*/
interface simple_command_caller extends simple_keyed_method_caller<sstp_info_t> {}
interface simple_command_caller extends simple_keyed_method_caller<sstp_info_t> { }
/**
* 对参数进行简易处理的列表返值命令执行器
* @example
Expand All @@ -420,14 +420,14 @@ interface simple_command_caller extends simple_keyed_method_caller<sstp_info_t>
* });
* @group callers
*/
interface simple_list_command_caller extends simple_keyed_method_caller<list_info_t> {}
interface simple_list_command_caller extends simple_keyed_method_caller<list_info_t> { }

/**
* 比{@link jsstp_t}多了一个ghost_info属性
* 依赖{@link jsstp_t.default_info}中的`ReceiverGhostHWnd`定向给特定的ghost发送信息
* @see {@link jsstp_with_ghost_info_t.ghost_info}
*/
interface jsstp_with_ghost_info_t extends jsstp_t{
interface jsstp_with_ghost_info_t extends jsstp_t {
/**
* 该jsstp_t实例所指向的ghost的信息
*/
Expand All @@ -440,7 +440,7 @@ interface jsstp_with_ghost_info_t extends jsstp_t{
* @example
* let my_jsstp=new jsstp.type("my_coooool_jsstp",sstp_server_url);
*/
declare class jsstp_t{
declare class jsstp_t {
/**
* @group Types
*/
Expand Down Expand Up @@ -579,12 +579,12 @@ declare class jsstp_t{
* 对于所有ghost的fmoinfo进行处理
* @param {Function|undefined} operation 操作函数
*/
for_all_ghost_infos<result_T>(operation: (fmo_info: single_fmo_info_t) => result_T): Promise<info_object<string,result_T>>;
for_all_ghost_infos<result_T>(operation: (fmo_info: single_fmo_info_t) => result_T): Promise<info_object<string, result_T>>;
/**
* 对于所有ghost进行操作
* @param {Function|undefined} operation 操作函数
*/
for_all_ghosts<result_T>(operation: (jsstp: jsstp_with_ghost_info_t) => result_T): Promise<info_object<string,result_T>>;
for_all_ghosts<result_T>(operation: (jsstp: jsstp_with_ghost_info_t) => result_T): Promise<info_object<string, result_T>>;

/**
* 以文本发送报文并以文本接收返信
Expand Down Expand Up @@ -619,9 +619,9 @@ declare class jsstp_t{
* @returns {method_caller} 调用器
* @group Caller Methods
*/
/*@__PURE__*/get_caller_of_method<T=sstp_info_t,Rest extends any[]=[Object],Res=Object>(
/*@__PURE__*/get_caller_of_method<T = sstp_info_t, Rest extends any[] = [Object], Res = Object>(
method_name: String, result_type?: new (str: string) => T, args_processor?: (...args: Rest) => Res
): method_caller<T,Rest>;
): method_caller<T, Rest>;
/**
* 获取指定key的调用器
* @param {String} key_name 键名
Expand All @@ -631,11 +631,11 @@ declare class jsstp_t{
* @returns {Proxy<value>} 调用器
* @group Caller Methods
*/
/*@__PURE__*/get_caller_of_key<T=sstp_info_t,Rest extends any[]=[Object],Res=Object>(
/*@__PURE__*/get_caller_of_key<T = sstp_info_t, Rest extends any[] = [Object], Res = Object>(
key_name: String, value_name: String,
method_caller?: method_caller<T,[Res]>,
method_caller?: method_caller<T, [Res]>,
args_processor?: (...args: Rest) => Res
): base_keyed_method_caller<T,Rest>;
): base_keyed_method_caller<T, Rest>;

/**
* 用于获取指定key的简单调用器
Expand All @@ -645,9 +645,9 @@ declare class jsstp_t{
* @returns {Proxy<value>} 调用器
* @group Caller Methods
*/
/*@__PURE__*/get_simple_caller_of_key<T=sstp_info_t>(
/*@__PURE__*/get_simple_caller_of_key<T = sstp_info_t>(
key_name: String, value_name: String,
method_caller?: method_caller<T,[Object]>,
method_caller?: method_caller<T, [Object]>,
): simple_keyed_method_caller<T>;
/**
* 用于获取指定事件的简单调用器的代理
Expand Down Expand Up @@ -778,7 +778,7 @@ declare class jsstp_t{
* });
* @group PromiseLike Methods
*/
/*@__PURE__*/if_available<result_T=undefined>(resolve: (value?: jsstp_t) => result_T): Promise<result_T>;
/*@__PURE__*/if_available<result_T = undefined>(resolve: (value?: jsstp_t) => result_T): Promise<result_T>;
/**
* 获取一个用于查询ghost所支持事件的queryer
* @returns {Promise<ghost_events_queryer_t>} 查询支持事件的queryer
Expand All @@ -803,7 +803,7 @@ declare class jsstp_t{
* @see {@link jsstp_t.new_event_queryer}
* @group ghost_events_queryer_t implementations
*/
declare class ghost_events_queryer_t_class_impl extends ExtensibleFunction<string[],Promise<Boolean>> {
declare class ghost_events_queryer_t_class_impl extends ExtensibleFunction<string[], Promise<Boolean>> {
/**
* 构造一个事件查询器
* @param {jsstp_t} base_jsstp
Expand Down
Loading

0 comments on commit 2cb88bc

Please sign in to comment.