a-calc 1.3.2 → 1.3.3-dev.20230726

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.
Files changed (2) hide show
  1. package/calc.d.ts +8 -7
  2. package/package.json +5 -3
package/calc.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- type If_StrInclude<S, SU extends string> = S extends `${string}${SU}${string}` ? true : false;
1
+ import { Utils, StrRemove, If_StrInclude } from "typescript-treasure";
2
2
 
3
3
  export type InjectDataFn<Expr> = <const Data>
4
4
  (fill_data: Data extends string | number | undefined | null ? never : Data) =>
@@ -19,13 +19,14 @@ export type InjectExprFn<Data> = <const Expr>
19
19
  string | GetWrapErr<Data>
20
20
  );
21
21
 
22
- type StringToUnion<T extends string> = T extends `${infer Letter}${infer Rest}` ? Letter | Uppercase<Letter> | StringToUnion<Rest> : never;
23
22
 
24
- type VarUnion = StringToUnion<"abcdefghijklmnopqrstuvwxyz_$">
25
-
26
- type StrRemove<Str, SubStr extends string> = Str extends `${infer F}${SubStr}${infer R}` ? `${F}${R}` : Str;
27
-
28
- type If_IncludesVar<T> = T extends string ? StrRemove<StrRemove<T, "!n">, "!e"> extends `${infer F}${infer R}` ? F extends VarUnion ? true : If_IncludesVar<R> : false : false
23
+ type If_IncludesVar<T> =
24
+ Utils.If_IncludeVar<
25
+ StrRemove<
26
+ StrRemove<T, "!n">,
27
+ "!e"
28
+ >
29
+ >
29
30
 
30
31
  type If_NumOrStr<T> = T extends string | number ? true : false;
31
32
  type If_FillData<T> = T extends string | number | undefined | null ? false : true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "a-calc",
3
- "version": "1.3.2",
3
+ "version": "1.3.3-dev.20230726",
4
4
  "description": "Very powerful arbitrary precision calculation library and number formatting library",
5
5
  "main": "./cjs/index.cjs",
6
6
  "exports": {
@@ -90,7 +90,9 @@
90
90
  "rollup-plugin-serve": "^1.1.0",
91
91
  "rollup-plugin-terser": "^7.0.2",
92
92
  "rollup-plugin-uglify": "^6.0.4",
93
- "typescript": "^5.1.6",
94
- "@type-challenges/utils": "^0.1.1"
93
+ "typescript": "^5.1.6"
94
+ },
95
+ "dependencies": {
96
+ "typescript-treasure": "0.0.2-dev.2023.7.2601"
95
97
  }
96
98
  }