inferred-types 0.41.3 → 0.41.4
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 +6 -0
- package/package.json +5 -6
package/README.md
CHANGED
|
@@ -17,6 +17,12 @@ Under the `src/` folder you'll find the the following subdirectories:
|
|
|
17
17
|
- `types` - this folder represents the heart of the repo in the form of _type utilities_ and is further broken down by an attempt at functional classification that hopefully aides somewhat in feature discovery.
|
|
18
18
|
- `runtime` - this is where you'll find runtime functions which mutate state while taking care to provide as much as type information that compliments the runtime environment as is possible.
|
|
19
19
|
|
|
20
|
+
## Runtime synchronization with Types
|
|
21
|
+
|
|
22
|
+
You will find many runtime functions like `ensureleading(str, substring)` which have a similarly named type (in this case `EnsureLeading<TStr, TSubstring>`). This is no accident and at some future point there may even be something approximating 1:1 parity.
|
|
23
|
+
|
|
24
|
+
This connection between the type system and the runtime environment allows both a harmonization of variables across both environments and helps to ensure their consistency but it the runtime environment also often really needs strong type utilities to extract out narrow type definitions in the runtime environment.
|
|
25
|
+
|
|
20
26
|
## Examples
|
|
21
27
|
|
|
22
28
|
What follows is not meant to be comprehensive set of examples but rather just a sampling that hopefully gives some perspective on the breadth of scope of this library.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "inferred-types",
|
|
3
|
-
"version": "0.41.
|
|
3
|
+
"version": "0.41.4",
|
|
4
4
|
"description": "Functions which provide useful type inference on TS projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ken Snyder<ken@ken.net>",
|
|
@@ -24,12 +24,11 @@
|
|
|
24
24
|
"sideEffects": false,
|
|
25
25
|
"scripts": {
|
|
26
26
|
"prepare": "ts-patch install -s",
|
|
27
|
-
"about": "tokei src",
|
|
28
27
|
"build": "run-s build:esm build:cjs",
|
|
29
28
|
"build:esm": "tsc -b --verbose src/inferred-types",
|
|
30
29
|
"build:cjs": "tsup dist/inferred-types/index.js --format cjs -d dist/inferred-types",
|
|
31
30
|
"build:force": "rimraf dist && tsc -b -f --verbose src/inferred-types",
|
|
32
|
-
"diagnostics": "npx tsc -b -f
|
|
31
|
+
"diagnostics": "npx tsc -b -f --extendedDiagnostics src/inferred-types",
|
|
33
32
|
"clean": "rimraf dist/**/*",
|
|
34
33
|
"lint": "run-s lint:*",
|
|
35
34
|
"lint:test": "pnpm eslint -c .eslintrc.json ./tests/**/*.ts --ext ts --fix",
|
|
@@ -49,11 +48,10 @@
|
|
|
49
48
|
"watch:bundle": "tsup src/index.ts --format=esm --dts"
|
|
50
49
|
},
|
|
51
50
|
"dependencies": {
|
|
52
|
-
"
|
|
53
|
-
"vue": "^3.4.14"
|
|
51
|
+
"vue": "^3.4.15"
|
|
54
52
|
},
|
|
55
53
|
"devDependencies": {
|
|
56
|
-
"@arktype/attest": "
|
|
54
|
+
"@arktype/attest": "@arktype/attest@beta",
|
|
57
55
|
"@type-challenges/utils": "~0.1.1",
|
|
58
56
|
"@types/node": "^18.19.8",
|
|
59
57
|
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
|
@@ -76,6 +74,7 @@
|
|
|
76
74
|
"prettier": "^3.2.4",
|
|
77
75
|
"ts-patch": "^3.1.2",
|
|
78
76
|
"tsup": "^8.0.1",
|
|
77
|
+
"tsx": "^4.7.0",
|
|
79
78
|
"typescript": "5.3.3",
|
|
80
79
|
"typescript-transform-paths": "^3.4.6",
|
|
81
80
|
"typescript-transformer-esm": "^1.1.0",
|