@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.
@@ -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.0.3",
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/types/index.d.ts",
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/types/index.d.ts",
30
+ "types": "dist/neutral/index.d.ts",
31
31
  "devDependencies": {
32
32
  "@types/node": "^24.0.13",
33
- "@xylabs/ts-scripts-yarn3": "^6.5.18",
34
- "@xylabs/tsconfig": "^6.5.18",
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": {
@@ -1,6 +0,0 @@
1
- export * from './ifDefined.ts';
2
- export * from './ifTypeOf.ts';
3
- export * from './typeOf.ts';
4
- export * from './TypeOfTypes.ts';
5
- export * from './validateType.ts';
6
- //# sourceMappingURL=index.d.ts.map
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