@e-mc/types 0.9.7 → 0.10.0
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/README.md +13 -9
- package/constant.d.ts +37 -8
- package/index.d.ts +27 -14
- package/index.js +319 -218
- package/lib/asset.d.ts +2 -2
- package/lib/cloud.d.ts +1 -1
- package/lib/compat-v4.d.ts +11 -6
- package/lib/compress.d.ts +9 -8
- package/lib/core.d.ts +7 -7
- package/lib/db.d.ts +13 -9
- package/lib/document.d.ts +6 -4
- package/lib/filemanager.d.ts +10 -9
- package/lib/http.d.ts +2 -1
- package/lib/index.d.ts +53 -46
- package/lib/logger.d.ts +3 -0
- package/lib/module.d.ts +21 -38
- package/lib/node.d.ts +2 -2
- package/lib/object.d.ts +0 -2
- package/lib/request.d.ts +8 -4
- package/lib/settings.d.ts +86 -66
- package/lib/squared.d.ts +8 -45
- package/lib/type.d.ts +6 -4
- package/package.json +2 -2
- package/lib/dom.d.ts +0 -9
package/lib/type.d.ts
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
/* eslint @typescript-eslint/no-explicit-any: "off", @typescript-eslint/no-redeclare: "off" */
|
|
2
|
-
|
|
3
1
|
type Undef<T> = T | undefined;
|
|
4
2
|
type Null<T> = T | null;
|
|
5
3
|
type Void<T> = T | void;
|
|
6
4
|
type Optional<T> = T | null | undefined;
|
|
7
5
|
type Nullable<T> = { [P in keyof T]: T[P] | null; };
|
|
8
|
-
type
|
|
6
|
+
type Writable<T> = { -readonly [P in keyof T]: T[P] };
|
|
9
7
|
type KeyOfType<T, U = any, V = any> = { [K in keyof T]: K extends U ? T[K] extends V ? K : never : never }[keyof T];
|
|
10
8
|
type MapOfType<T, U = any, V = any> = { [K in KeyOfType<T, U, V>]: K extends U ? T[K] extends V ? T[K] : never : never };
|
|
11
9
|
|
|
12
10
|
type Constructor<out T> = new(...args: any[]) => T;
|
|
11
|
+
type ConstructorDerived<T> = Pick<T, { [K in keyof T]: T[K] extends new() => any ? never : K }[keyof T]>;
|
|
13
12
|
|
|
14
13
|
type FunctionType<T = unknown, U = unknown> = (...args: U[]) => T;
|
|
15
14
|
type FunctionArgs<T extends unknown[], U = unknown> = (...args: T) => U;
|
|
16
15
|
|
|
16
|
+
/** @deprecated */
|
|
17
17
|
type NumString = number | string;
|
|
18
|
+
type IntBool = boolean | 0 | 1;
|
|
18
19
|
type ArrayOf<T> = T | T[];
|
|
19
20
|
type TupleOf<T> = [T, T];
|
|
20
|
-
type FirstOf<T, U = boolean> = T[] | [U, ...T[]];
|
|
21
|
+
type FirstOf<T, U = boolean> = T extends U ? [T, ...T[]] : T[] | [U, T, ...T[]];
|
|
21
22
|
type Bufferable = string | Buffer;
|
|
22
23
|
|
|
23
24
|
type AnyObject = Record<string, unknown>;
|
|
@@ -26,6 +27,7 @@ type PlainObject = Record<string | number | symbol, unknown>;
|
|
|
26
27
|
type StandardMap = Record<string, any>;
|
|
27
28
|
type StringMap = Record<string, Undef<string>>;
|
|
28
29
|
type ObjectMap<T> = Record<string, Undef<T>>;
|
|
30
|
+
type IterableMap<T> = Record<string, T>;
|
|
29
31
|
|
|
30
32
|
type PropertyAction<T, U extends string, V extends boolean = false> = {
|
|
31
33
|
[K in keyof T as `${U}${V extends true ? string & K : Capitalize<string & K>}`]: T[K];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e-mc/types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Type definitions for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -23,6 +23,6 @@
|
|
|
23
23
|
"bytes": "^3.1.2"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"typescript": "5.4
|
|
26
|
+
"typescript": "5.5.4"
|
|
27
27
|
}
|
|
28
28
|
}
|