@gershy/clearing 0.0.9 → 0.0.11

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.
@@ -9,11 +9,9 @@ declare global {
9
9
  type ObjKeys<O extends Obj> = Extract<keyof O, string> | `${Extract<keyof O, number>}`; // Convert numbers to strings; ignores symbols
10
10
  type ObjVals<O extends Obj> = O[Extract<keyof O, string>];
11
11
 
12
- type Itr<O extends Obj> = Iterable<[ ObjKeys<O>, ObjVals<O> ]>;
13
12
  type Json = null | boolean | number | string | Json[] | { [K: string]: Json };
14
13
  type Skip = undefined;
15
14
  type SkipNever<V> = V extends Skip ? Skip extends V ? never : V : V;
16
- type UGH = any; // Use when necessary to escape typing because typescript has failed us
17
15
 
18
16
  type Dive<O extends Obj, K extends readonly string[], D = undefined> =
19
17
  K extends [ infer K0 extends string, ...infer KM extends string[] ]
@@ -28,9 +26,6 @@ declare global {
28
26
  charVal: (c: string) => bigint,
29
27
  valChar: (n: bigint) => string
30
28
  };
31
-
32
- type MaybePromise<T> = T | Promise<T>;
33
-
34
29
  type ClsCheck = {
35
30
  (i: unknown, num: BooleanConstructor): i is boolean,
36
31
  (i: unknown, num: NumberConstructor): i is number,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gershy/clearing",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "description": "Adds the features you always wish javascript had!",
5
5
  "keywords": [
6
6
  "clearing",
@@ -17,31 +17,30 @@
17
17
  },
18
18
  "homepage": "https://github.com/gershy/clearing#readme",
19
19
  "license": "ISC",
20
- "types": "./cmp/types/global.d.ts",
21
- "exports": {
22
- ".": {
23
- "import": "./cmp/mjs/main.js",
24
- "require": "./cmp/cjs/main.js",
25
- "types": "./cmp/types/global.d.ts"
26
- }
27
- },
28
20
  "devDependencies": {
29
21
  "@types/node": "^24.10.1",
30
- "cpx": "^1.5.0",
31
- "rimraf": "^6.1.2",
32
22
  "tsx": "^4.21.0",
33
23
  "typescript": "^5.9.3"
34
24
  },
25
+ "type": "module",
35
26
  "files": [
36
27
  "cmp"
37
28
  ],
29
+ "exports": {
30
+ ".": {
31
+ "import": "./cmp/mjs/main.js",
32
+ "require": "./cmp/cjs/main.js",
33
+ "types": "./cmp/types/sideEffects.d.ts"
34
+ }
35
+ },
36
+ "types": "./cmp/types/sideEffects.d.ts",
38
37
  "scripts": {
39
- "test": "npx tsx ./src/main.test.mts",
38
+ "test": "npm run ts.check && npx tsx ./src/main.test.ts",
40
39
  "ts.check": "npx tsc --noEmit",
41
40
  "build.cjs": "tsc -p ts/tsconfig.cjs.json",
42
41
  "build.mjs": "tsc -p ts/tsconfig.mjs.json",
43
- "build.types": "cpx src/global.d.ts cmp/types",
44
- "build": "rimraf cmp && npm run build.cjs && npm run build.mjs && npm run build.types",
42
+ "build.types": "npx tsx ./build.ts copyGlobalTypes",
43
+ "build": "npx tsx ./build.ts removeCmp && npm run build.cjs && npm run build.mjs && npm run build.types",
45
44
  "git.pub": "npm run test && git add --all && git commit -m \"automated\" && git push",
46
45
  "npm.login": "npm login",
47
46
  "npm.pub": "npm run test && npm run build && npm publish --access public"