utilium 0.5.7 → 0.5.8

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.
package/dist/list.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import { EventEmitter } from 'eventemitter3';
3
2
  export declare class List<T> extends EventEmitter<'update'> implements Set<T>, RelativeIndexable<T> {
4
3
  readonly [Symbol.toStringTag] = "List";
package/dist/struct.d.ts CHANGED
@@ -30,94 +30,13 @@ export declare function deserialize(instance: unknown, _buffer: ArrayBuffer | Ar
30
30
  * Also can be a name when legacy decorators are used
31
31
  */
32
32
  type Context = string | symbol | ClassMemberDecoratorContext;
33
+ declare function _member<T extends primitive.Valid>(type: T): {
34
+ (length: number): (target: object, context?: Context) => void;
35
+ (target: object, context?: Context): void;
36
+ };
33
37
  /**
34
38
  * Shortcut types
35
39
  *
36
40
  * Instead of writing `@member(type)` you can write `@types.type`, or `@types.type(length)` for arrays
37
41
  */
38
- export declare const types: {
39
- int8: {
40
- (length: number): (target: object, context?: Context) => void;
41
- (target: object, context?: Context): void;
42
- };
43
- int16: {
44
- (length: number): (target: object, context?: Context) => void;
45
- (target: object, context?: Context): void;
46
- };
47
- int32: {
48
- (length: number): (target: object, context?: Context) => void;
49
- (target: object, context?: Context): void;
50
- };
51
- int64: {
52
- (length: number): (target: object, context?: Context) => void;
53
- (target: object, context?: Context): void;
54
- };
55
- uint8: {
56
- (length: number): (target: object, context?: Context) => void;
57
- (target: object, context?: Context): void;
58
- };
59
- uint16: {
60
- (length: number): (target: object, context?: Context) => void;
61
- (target: object, context?: Context): void;
62
- };
63
- uint32: {
64
- (length: number): (target: object, context?: Context) => void;
65
- (target: object, context?: Context): void;
66
- };
67
- uint64: {
68
- (length: number): (target: object, context?: Context) => void;
69
- (target: object, context?: Context): void;
70
- };
71
- float32: {
72
- (length: number): (target: object, context?: Context) => void;
73
- (target: object, context?: Context): void;
74
- };
75
- float64: {
76
- (length: number): (target: object, context?: Context) => void;
77
- (target: object, context?: Context): void;
78
- };
79
- Int8: {
80
- (length: number): (target: object, context?: Context) => void;
81
- (target: object, context?: Context): void;
82
- };
83
- Int16: {
84
- (length: number): (target: object, context?: Context) => void;
85
- (target: object, context?: Context): void;
86
- };
87
- Int32: {
88
- (length: number): (target: object, context?: Context) => void;
89
- (target: object, context?: Context): void;
90
- };
91
- Int64: {
92
- (length: number): (target: object, context?: Context) => void;
93
- (target: object, context?: Context): void;
94
- };
95
- Uint8: {
96
- (length: number): (target: object, context?: Context) => void;
97
- (target: object, context?: Context): void;
98
- };
99
- Uint16: {
100
- (length: number): (target: object, context?: Context) => void;
101
- (target: object, context?: Context): void;
102
- };
103
- Uint32: {
104
- (length: number): (target: object, context?: Context) => void;
105
- (target: object, context?: Context): void;
106
- };
107
- Uint64: {
108
- (length: number): (target: object, context?: Context) => void;
109
- (target: object, context?: Context): void;
110
- };
111
- Float32: {
112
- (length: number): (target: object, context?: Context) => void;
113
- (target: object, context?: Context): void;
114
- };
115
- Float64: {
116
- (length: number): (target: object, context?: Context) => void;
117
- (target: object, context?: Context): void;
118
- };
119
- char: {
120
- (length: number): (target: object, context?: Context) => void;
121
- (target: object, context?: Context): void;
122
- };
123
- };
42
+ export declare const types: { [K in primitive.Valid]: ReturnType<typeof _member<K>>; };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "utilium",
3
- "version": "0.5.7",
3
+ "version": "0.5.8",
4
4
  "description": "Typescript utilies",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -33,8 +33,8 @@
33
33
  "@typescript-eslint/parser": "^6.2.0",
34
34
  "eslint": "^8.45.0",
35
35
  "prettier": "^3.2.5",
36
- "typedoc": "^0.24.8",
37
- "typescript": "^5.1.6"
36
+ "typedoc": "^0.26.6",
37
+ "typescript": "^5.5.4"
38
38
  },
39
39
  "dependencies": {
40
40
  "eventemitter3": "^5.0.1"