@xyo-network/typeof 4.0.3 → 4.1.1
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/neutral/index.d.ts +12 -0
- package/package.json +5 -5
- package/dist/types/index.d.ts +0 -6
- /package/dist/{types → neutral}/TypeOfTypes.d.ts +0 -0
- /package/dist/{types → neutral}/TypeOfTypes.d.ts.map +0 -0
- /package/dist/{types → neutral}/ifDefined.d.ts +0 -0
- /package/dist/{types → neutral}/ifDefined.d.ts.map +0 -0
- /package/dist/{types → neutral}/ifTypeOf.d.ts +0 -0
- /package/dist/{types → neutral}/ifTypeOf.d.ts.map +0 -0
- /package/dist/{types → neutral}/index.d.ts.map +0 -0
- /package/dist/{types → neutral}/typeOf.d.ts +0 -0
- /package/dist/{types → neutral}/typeOf.d.ts.map +0 -0
- /package/dist/{types → neutral}/validateType.d.ts +0 -0
- /package/dist/{types → neutral}/validateType.d.ts.map +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const ifDefined: <T>(value: T, function_: (value: T) => void) => T | undefined;
|
|
2
|
+
|
|
3
|
+
type TypeOfTypes = 'string' | 'number' | 'object' | 'array' | 'buffer' | 'null' | 'undefined' | 'bigint' | 'boolean' | 'function' | 'symbol';
|
|
4
|
+
|
|
5
|
+
declare const ifTypeOf: <T, R>(typeName: TypeOfTypes, value: unknown, trueFunction: (value: T) => R, isFunction?: (value: T) => boolean) => R | undefined;
|
|
6
|
+
|
|
7
|
+
declare const typeOf: <T>(item: T) => TypeOfTypes;
|
|
8
|
+
|
|
9
|
+
declare const validateType: <T>(typeName: TypeOfTypes, value: T, optional?: boolean) => [T | undefined, Error[]];
|
|
10
|
+
|
|
11
|
+
export { ifDefined, ifTypeOf, typeOf, validateType };
|
|
12
|
+
export type { TypeOfTypes };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/typeof",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.1",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -21,17 +21,17 @@
|
|
|
21
21
|
"type": "module",
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
24
|
-
"types": "./dist/
|
|
24
|
+
"types": "./dist/neutral/index.d.ts",
|
|
25
25
|
"default": "./dist/neutral/index.mjs"
|
|
26
26
|
},
|
|
27
27
|
"./package.json": "./package.json"
|
|
28
28
|
},
|
|
29
29
|
"module": "dist/neutral/index.mjs",
|
|
30
|
-
"types": "dist/
|
|
30
|
+
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^24.0.13",
|
|
33
|
-
"@xylabs/ts-scripts-yarn3": "^
|
|
34
|
-
"@xylabs/tsconfig": "^
|
|
33
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.23",
|
|
34
|
+
"@xylabs/tsconfig": "^7.0.0-rc.23",
|
|
35
35
|
"typescript": "^5.8.3"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
package/dist/types/index.d.ts
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|