ziko 0.49.3 → 0.49.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,12 @@
1
+ export declare class UseChannel {
2
+ emit(event: string, data: any, rooms?: string[]): this;
3
+ on(event: string, handler: (data: any) => void, rooms?: string | string[]): this;
4
+ off(event: string, handler: (data: any) => void): this;
5
+ once(event: string, handler: (data: any) => void, rooms?: string | string[]): this;
6
+ join(...rooms: string[]): this;
7
+ leave(...rooms: string[]): this;
8
+ close(): this;
9
+
10
+ }
11
+
12
+ export declare const useChannel: (name?: string) => UseChannel;
package/types/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export type * from './math'
2
- export type * from './time'
2
+ export type * from './time'
3
+ export type * from './hooks'
@@ -0,0 +1,140 @@
1
+ import type { Complex } from "../complex/index.js";
2
+ import type { MapfunResult, Mappable } from "../utils/mapfun.js";
3
+
4
+ /* -------------------- MapfunWrap -------------------- */
5
+
6
+ type MapfunWrap<F extends (x: any) => any, A extends Mappable[]> =
7
+ A["length"] extends 1
8
+ ? MapfunResult<F, A[0]>
9
+ : { [K in keyof A]: MapfunResult<F, A[K]> };
10
+
11
+
12
+ /* -------------------- mapfun-based simple operators -------------------- */
13
+
14
+ export declare function abs<A extends Mappable[]>(...x: A):
15
+ MapfunWrap<typeof Math.abs, A>;
16
+
17
+ export declare function sqrt<A extends Mappable[]>(...x: A):
18
+ MapfunWrap<typeof Math.sqrt, A>;
19
+
20
+ export declare function e<A extends Mappable[]>(...x: A):
21
+ MapfunWrap<typeof Math.exp, A>;
22
+
23
+ export declare function ln<A extends Mappable[]>(...x: A):
24
+ MapfunWrap<typeof Math.log, A>;
25
+
26
+ /* ---- Fixed-based operators ---- */
27
+
28
+ export declare function cos<A extends Mappable[]>(...x: A):
29
+ MapfunWrap<typeof Math.cos, A>;
30
+
31
+ export declare function sin<A extends Mappable[]>(...x: A):
32
+ MapfunWrap<Math.sin, A>;
33
+
34
+ export declare function tan<A extends Mappable[]>(...x: A):
35
+ MapfunWrap<Math.tan, A>;
36
+
37
+ export declare function sec<A extends Mappable[]>(...x: A):
38
+ MapfunWrap<Math.sec, A>;
39
+
40
+ export declare function sinc<A extends Mappable[]>(...x: A):
41
+ MapfunWrap<Math.sinc, A>;
42
+
43
+ export declare function csc<A extends Mappable[]>(...x: A):
44
+ MapfunWrap<Math.csc, A>;
45
+
46
+ export declare function cot<A extends Mappable[]>(...x: A):
47
+ MapfunWrap<Math.cot, A>;
48
+
49
+ export declare function acos<A extends Mappable[]>(...x: A):
50
+ MapfunWrap<Math.acos, A>;
51
+
52
+ export declare function asin<A extends Mappable[]>(...x: A):
53
+ MapfunWrap<Math.asin, A>;
54
+
55
+ export declare function atan<A extends Mappable[]>(...x: A):
56
+ MapfunWrap<Math.atan, A>;
57
+
58
+ export declare function acot<A extends Mappable[]>(...x: A):
59
+ MapfunWrap<Math.acot, A>;
60
+
61
+ export declare function cosh<A extends Mappable[]>(...x: A):
62
+ MapfunWrap<Math.cosh, A>;
63
+
64
+ export declare function sinh<A extends Mappable[]>(...x: A):
65
+ MapfunWrap<Math.sinh, A>;
66
+
67
+ export declare function tanh<A extends Mappable[]>(...x: A):
68
+ MapfunWrap<Math.tanh, A>;
69
+
70
+ export declare function coth<A extends Mappable[]>(...x: A):
71
+ MapfunWrap<Math.coth, A>;
72
+
73
+ export declare function acosh<A extends Mappable[]>(...x: A):
74
+ MapfunWrap<Math.acosh, A>;
75
+
76
+ export declare function asinh<A extends Mappable[]>(...x: A):
77
+ MapfunWrap<Math.asinh, A>;
78
+
79
+ export declare function atanh<A extends Mappable[]>(...x: A):
80
+ MapfunWrap<Math.atanh, A>;
81
+
82
+ /* ---- Math wrappers ---- */
83
+
84
+ export declare function ceil<A extends Mappable[]>(...x: A):
85
+ MapfunWrap<typeof Math.ceil, A>;
86
+
87
+ export declare function floor<A extends Mappable[]>(...x: A):
88
+ MapfunWrap<typeof Math.floor, A>;
89
+
90
+ export declare function round<A extends Mappable[]>(...x: A):
91
+ MapfunWrap<typeof Math.round, A>;
92
+
93
+ export declare function sign<A extends Mappable[]>(...x: A):
94
+ MapfunWrap<typeof Math.sign, A>;
95
+
96
+ export declare function sig<A extends Mappable[]>(...x: A):
97
+ MapfunWrap<(n: number) => number, A>;
98
+
99
+ export declare function fact<A extends Mappable[]>(...x: A):
100
+ MapfunWrap<(n: number) => number, A>;
101
+
102
+
103
+ /* -------------------- pow -------------------- */
104
+
105
+ export declare function pow(x: number, n: number): number;
106
+ export declare function pow(x: number, n: Complex): Complex;
107
+ export declare function pow(x: number, n: Mappable): any;
108
+
109
+ export declare function pow(x: Complex, n: number): Complex;
110
+ export declare function pow(x: Complex, n: Complex): Complex;
111
+ export declare function pow(x: Complex, n: Mappable): any;
112
+
113
+ export declare function pow(x: Mappable[], n: number): any[];
114
+ export declare function pow(x: Mappable[], n: Mappable[]): any[];
115
+
116
+
117
+ /* -------------------- sqrtn -------------------- */
118
+
119
+ export declare function sqrtn(x: number, n: number): number;
120
+ export declare function sqrtn(x: number, n: Mappable): any;
121
+
122
+ export declare function sqrtn(x: Complex, n: number): Complex;
123
+ export declare function sqrtn(x: Complex, n: Mappable): any;
124
+
125
+ export declare function sqrtn(x: Mappable[], n: number): any[];
126
+ export declare function sqrtn(x: Mappable[], n: Mappable[]): any[];
127
+
128
+
129
+ /* -------------------- atan2 -------------------- */
130
+
131
+ export declare function atan2(x: number, y: number, rad?: boolean): number;
132
+ export declare function atan2(x: number, y: Mappable, rad?: boolean): any;
133
+ export declare function atan2(x: Mappable, y: number, rad?: boolean): any;
134
+ export declare function atan2(x: Mappable[], y: Mappable[], rad?: boolean): any[];
135
+
136
+
137
+ /* -------------------- hypot -------------------- */
138
+
139
+ export declare function hypot(...x: number[]): number;
140
+ export declare function hypot(...x: Mappable[]): any;
@@ -1,2 +1,3 @@
1
- export * from "./complex"
2
- export * from './utils'
1
+ export type * from './functions'
2
+ export type * from './complex'
3
+ export type * from './utils'
@@ -1 +0,0 @@
1
- export default class ZikoMath {}