ts-type 3.0.5 → 3.0.8

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/CHANGELOG.md CHANGED
@@ -3,6 +3,41 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.0.8](https://github.com/bluelovers/ws-ts-type/compare/ts-type@3.0.7...ts-type@3.0.8) (2026-03-07)
7
+
8
+
9
+
10
+ ### 🔖 Miscellaneous
11
+
12
+ * . ([9761de3](https://github.com/bluelovers/ws-ts-type/commit/9761de3806528e767efcfa3abd48a4ff1bac54c2))
13
+
14
+
15
+
16
+ ## [3.0.7](https://github.com/bluelovers/ws-ts-type/compare/ts-type@3.0.5...ts-type@3.0.7) (2026-03-07)
17
+
18
+
19
+
20
+ ### ✨ Features
21
+
22
+ * **ts-type:** 添加 ITSGenerator 和 ITSAsyncGenerator 類型定義 ([efea1fc](https://github.com/bluelovers/ws-ts-type/commit/efea1fc54b48baa44231d7076f2d994da8c43701))
23
+
24
+
25
+ ### 🔖 Miscellaneous
26
+
27
+ * . ([6328603](https://github.com/bluelovers/ws-ts-type/commit/6328603d30d4af3cf84aefa466f566a127adb2cb))
28
+
29
+
30
+
31
+ ## [3.0.6](https://github.com/bluelovers/ws-ts-type/compare/ts-type@3.0.5...ts-type@3.0.6) (2026-03-07)
32
+
33
+
34
+
35
+ ### ✨ Features
36
+
37
+ * **ts-type:** 添加 ITSGenerator 和 ITSAsyncGenerator 類型定義 ([efea1fc](https://github.com/bluelovers/ws-ts-type/commit/efea1fc54b48baa44231d7076f2d994da8c43701))
38
+
39
+
40
+
6
41
  ## [3.0.5](https://github.com/bluelovers/ws-ts-type/compare/ts-type@3.0.3...ts-type@3.0.5) (2026-03-07)
7
42
 
8
43
 
package/lib/index.d.ts CHANGED
@@ -32,6 +32,7 @@ export * from './logic/record/empty';
32
32
  export * from './logic/union/index';
33
33
  export * from './type/base';
34
34
  export * from './type/decorators';
35
+ export * from './type/generator';
35
36
  export * from './type/iterator';
36
37
  export * from './type/promise';
37
38
  export * from './type/proxy';
@@ -0,0 +1,24 @@
1
+ /**
2
+ * TypeScript Generator 類型
3
+ * TypeScript Generator type
4
+ *
5
+ * 代表 JavaScript Generator 物件的類型
6
+ * Represents the type of a JavaScript Generator object
7
+ *
8
+ * @typeParam T - 生成器yield的值類型 / Type of value yielded by the generator
9
+ * @typeParam TReturn - 生成器完成時返回的類型 / Type returned when generator completes
10
+ * @typeParam TNext - 傳遞給生成器next()方法的參數類型 / Type of argument passed to generator's next() method
11
+ */
12
+ export type ITSGenerator<T = unknown, TReturn = T, TNext = T> = Generator<T, TReturn, TNext>;
13
+ /**
14
+ * TypeScript AsyncGenerator 類型
15
+ * TypeScript AsyncGenerator type
16
+ *
17
+ * 代表 JavaScript AsyncGenerator 物件的類型
18
+ * Represents the type of a JavaScript AsyncGenerator object
19
+ *
20
+ * @typeParam T - 生成器yield的值類型 / Type of value yielded by the async generator
21
+ * @typeParam TReturn - 生成器完成時返回的類型 / Type returned when async generator completes
22
+ * @typeParam TNext - 傳遞給生成器next()方法的參數類型 / Type of argument passed to async generator's next() method
23
+ */
24
+ export type ITSAsyncGenerator<T = unknown, TReturn = T, TNext = T> = AsyncGenerator<T, TReturn, TNext>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["generator.ts"],"names":[],"mappings":"","sourcesContent":["\n/**\n * TypeScript Generator 類型\n * TypeScript Generator type\n *\n * 代表 JavaScript Generator 物件的類型\n * Represents the type of a JavaScript Generator object\n *\n * @typeParam T - 生成器yield的值類型 / Type of value yielded by the generator\n * @typeParam TReturn - 生成器完成時返回的類型 / Type returned when generator completes\n * @typeParam TNext - 傳遞給生成器next()方法的參數類型 / Type of argument passed to generator's next() method\n */\nexport type ITSGenerator<T = unknown, TReturn = T, TNext = T> = Generator<T, TReturn, TNext>;\n\n/**\n * TypeScript AsyncGenerator 類型\n * TypeScript AsyncGenerator type\n *\n * 代表 JavaScript AsyncGenerator 物件的類型\n * Represents the type of a JavaScript AsyncGenerator object\n *\n * @typeParam T - 生成器yield的值類型 / Type of value yielded by the async generator\n * @typeParam TReturn - 生成器完成時返回的類型 / Type returned when async generator completes\n * @typeParam TNext - 傳遞給生成器next()方法的參數類型 / Type of argument passed to async generator's next() method\n */\nexport type ITSAsyncGenerator<T = unknown, TReturn = T, TNext = T> = AsyncGenerator<T, TReturn, TNext>;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-type",
3
- "version": "3.0.5",
3
+ "version": "3.0.8",
4
4
  "description": "TypeScript 類型工具庫:提供豐富的類型操作工具和重新導出的內建類型 / TypeScript type utility library: provides rich type manipulation utilities and re-exported built-in types",
5
5
  "keywords": [
6
6
  ".d.ts",
@@ -97,5 +97,5 @@
97
97
  "peerDependencies": {
98
98
  "ts-toolbelt": "^9.6.0"
99
99
  },
100
- "gitHead": "b51f3132e548b3444935904904d3f02324b5d4fe"
100
+ "gitHead": "4e08c71edeb293ead756af90a3f804d542362569"
101
101
  }
@@ -1,101 +0,0 @@
1
- {
2
- "name": "ts-type",
3
- "version": "3.0.5",
4
- "description": "TypeScript 類型工具庫:提供豐富的類型操作工具和重新導出的內建類型 / TypeScript type utility library: provides rich type manipulation utilities and re-exported built-in types",
5
- "keywords": [
6
- ".d.ts",
7
- "@types",
8
- "declaration",
9
- "dev",
10
- "develop",
11
- "development",
12
- "environment",
13
- "ide",
14
- "interface",
15
- "node",
16
- "playground",
17
- "runtime",
18
- "ts",
19
- "type",
20
- "type-level",
21
- "typelevel",
22
- "types",
23
- "typescript",
24
- "typing",
25
- "typings",
26
- "type-helper",
27
- "toolbox",
28
- "toolbelt",
29
- "utility",
30
- "utilities",
31
- "type-utilities",
32
- "type-manipulation",
33
- "advanced-types",
34
- "type-transform",
35
- "type-inference",
36
- "generic-types",
37
- "type-safe",
38
- "bilingual",
39
- "chinese",
40
- "english"
41
- ],
42
- "homepage": "https://github.com/bluelovers/ws-ts-type/tree/master/packages/ts-type#readme",
43
- "bugs": {
44
- "url": "https://github.com/bluelovers/ws-ts-type/issues"
45
- },
46
- "repository": {
47
- "type": "git",
48
- "url": "git+https://github.com/bluelovers/ws-ts-type.git",
49
- "directory": "packages/ts-type"
50
- },
51
- "license": "ISC",
52
- "author": "",
53
- "main": "index.js",
54
- "directories": {
55
- "lib": "lib",
56
- "test": "test"
57
- },
58
- "scripts": {
59
- "coverage": "yarn run test -- --coverage",
60
- "pretest": "yarn run build",
61
- "test": "yarn run ts:check && yarn run test:tsd",
62
- "test:jest": "jest --passWithNoTests",
63
- "test:jest:coverage": "node --run test:jest -- --coverage",
64
- "test:jest:snapshot": "yarn run test:jest -- -u",
65
- "test:snapshot": "yarn run test -- -u",
66
- "test:tsd": "tsd",
67
- "build": "yarn run build-lib-toc",
68
- "build-lib-toc": "ts-node ./test/script/toc && yarn run build:toc",
69
- "build:toc": "tsc --skipLibCheck & echo build:toc",
70
- "preversion": "yarn run test && yarn run postpublish:git:commit",
71
- "prepublishOnly": "echo prepublishOnly",
72
- "postpublish:git:commit": "git commit -m \"build(release): publish\" ./lib/index.d.ts & echo postpublish:git:commit",
73
- "ncu": "yarn-tool ncu -u",
74
- "sort-package-json": "yarn-tool sort",
75
- "ts:check": "tsc -p tsconfig.check.json --emitDeclarationOnly --skipLibCheck",
76
- "tsc:showConfig": "ynpx get-current-tsconfig -p"
77
- },
78
- "tsd": {
79
- "compilerOptions": {
80
- "skipLibCheck": true,
81
- "emitDeclarationOnly": true,
82
- "noUnusedParameters": false,
83
- "allowUnusedLabels": true,
84
- "noUnusedLocals": false,
85
- "noPropertyAccessFromIndexSignature": false
86
- },
87
- "directory": "test/spec",
88
- "testFiles": [
89
- "test/spec/**/*.ts"
90
- ]
91
- },
92
- "dependencies": {
93
- "@types/node": "*",
94
- "tslib": ">=2",
95
- "typedarray-dts": "^1.0.0"
96
- },
97
- "peerDependencies": {
98
- "ts-toolbelt": "^9.6.0"
99
- },
100
- "gitHead": "8733c903bb32e26825606684e3f2e29726775f01"
101
- }
@@ -1,101 +0,0 @@
1
- {
2
- "name": "ts-type",
3
- "version": "3.0.5",
4
- "description": "TypeScript 類型工具庫:提供豐富的類型操作工具和重新導出的內建類型 / TypeScript type utility library: provides rich type manipulation utilities and re-exported built-in types",
5
- "keywords": [
6
- ".d.ts",
7
- "@types",
8
- "declaration",
9
- "dev",
10
- "develop",
11
- "development",
12
- "environment",
13
- "ide",
14
- "interface",
15
- "node",
16
- "playground",
17
- "runtime",
18
- "ts",
19
- "type",
20
- "type-level",
21
- "typelevel",
22
- "types",
23
- "typescript",
24
- "typing",
25
- "typings",
26
- "type-helper",
27
- "toolbox",
28
- "toolbelt",
29
- "utility",
30
- "utilities",
31
- "type-utilities",
32
- "type-manipulation",
33
- "advanced-types",
34
- "type-transform",
35
- "type-inference",
36
- "generic-types",
37
- "type-safe",
38
- "bilingual",
39
- "chinese",
40
- "english"
41
- ],
42
- "homepage": "https://github.com/bluelovers/ws-ts-type/tree/master/packages/ts-type#readme",
43
- "bugs": {
44
- "url": "https://github.com/bluelovers/ws-ts-type/issues"
45
- },
46
- "repository": {
47
- "type": "git",
48
- "url": "git+https://github.com/bluelovers/ws-ts-type.git",
49
- "directory": "packages/ts-type"
50
- },
51
- "license": "ISC",
52
- "author": "",
53
- "main": "index.js",
54
- "directories": {
55
- "lib": "lib",
56
- "test": "test"
57
- },
58
- "scripts": {
59
- "coverage": "yarn run test -- --coverage",
60
- "pretest": "yarn run build",
61
- "test": "yarn run ts:check && yarn run test:tsd",
62
- "test:jest": "jest --passWithNoTests",
63
- "test:jest:coverage": "node --run test:jest -- --coverage",
64
- "test:jest:snapshot": "yarn run test:jest -- -u",
65
- "test:snapshot": "yarn run test -- -u",
66
- "test:tsd": "tsd",
67
- "build": "yarn run build-lib-toc",
68
- "build-lib-toc": "ts-node ./test/script/toc && yarn run build:toc",
69
- "build:toc": "tsc --skipLibCheck & echo build:toc",
70
- "preversion": "yarn run test && yarn run postpublish:git:commit",
71
- "prepublishOnly": "echo prepublishOnly",
72
- "postpublish:git:commit": "git commit -m \"build(release): publish\" ./lib/index.d.ts & echo postpublish:git:commit",
73
- "ncu": "yarn-tool ncu -u",
74
- "sort-package-json": "yarn-tool sort",
75
- "ts:check": "tsc -p tsconfig.check.json --emitDeclarationOnly --skipLibCheck",
76
- "tsc:showConfig": "ynpx get-current-tsconfig -p"
77
- },
78
- "tsd": {
79
- "compilerOptions": {
80
- "skipLibCheck": true,
81
- "emitDeclarationOnly": true,
82
- "noUnusedParameters": false,
83
- "allowUnusedLabels": true,
84
- "noUnusedLocals": false,
85
- "noPropertyAccessFromIndexSignature": false
86
- },
87
- "directory": "test/spec",
88
- "testFiles": [
89
- "test/spec/**/*.ts"
90
- ]
91
- },
92
- "dependencies": {
93
- "@types/node": "*",
94
- "tslib": ">=2",
95
- "typedarray-dts": "^1.0.0"
96
- },
97
- "peerDependencies": {
98
- "ts-toolbelt": "^9.6.0"
99
- },
100
- "gitHead": "8733c903bb32e26825606684e3f2e29726775f01"
101
- }
@@ -1,101 +0,0 @@
1
- {
2
- "name": "ts-type",
3
- "version": "3.0.5",
4
- "description": "TypeScript 類型工具庫:提供豐富的類型操作工具和重新導出的內建類型 / TypeScript type utility library: provides rich type manipulation utilities and re-exported built-in types",
5
- "keywords": [
6
- ".d.ts",
7
- "@types",
8
- "declaration",
9
- "dev",
10
- "develop",
11
- "development",
12
- "environment",
13
- "ide",
14
- "interface",
15
- "node",
16
- "playground",
17
- "runtime",
18
- "ts",
19
- "type",
20
- "type-level",
21
- "typelevel",
22
- "types",
23
- "typescript",
24
- "typing",
25
- "typings",
26
- "type-helper",
27
- "toolbox",
28
- "toolbelt",
29
- "utility",
30
- "utilities",
31
- "type-utilities",
32
- "type-manipulation",
33
- "advanced-types",
34
- "type-transform",
35
- "type-inference",
36
- "generic-types",
37
- "type-safe",
38
- "bilingual",
39
- "chinese",
40
- "english"
41
- ],
42
- "homepage": "https://github.com/bluelovers/ws-ts-type/tree/master/packages/ts-type#readme",
43
- "bugs": {
44
- "url": "https://github.com/bluelovers/ws-ts-type/issues"
45
- },
46
- "repository": {
47
- "type": "git",
48
- "url": "git+https://github.com/bluelovers/ws-ts-type.git",
49
- "directory": "packages/ts-type"
50
- },
51
- "license": "ISC",
52
- "author": "",
53
- "main": "index.js",
54
- "directories": {
55
- "lib": "lib",
56
- "test": "test"
57
- },
58
- "scripts": {
59
- "coverage": "yarn run test -- --coverage",
60
- "pretest": "yarn run build",
61
- "test": "yarn run ts:check && yarn run test:tsd",
62
- "test:jest": "jest --passWithNoTests",
63
- "test:jest:coverage": "node --run test:jest -- --coverage",
64
- "test:jest:snapshot": "yarn run test:jest -- -u",
65
- "test:snapshot": "yarn run test -- -u",
66
- "test:tsd": "tsd",
67
- "build": "yarn run build-lib-toc",
68
- "build-lib-toc": "ts-node ./test/script/toc && yarn run build:toc",
69
- "build:toc": "tsc --skipLibCheck & echo build:toc",
70
- "preversion": "yarn run test && yarn run postpublish:git:commit",
71
- "prepublishOnly": "echo prepublishOnly",
72
- "postpublish:git:commit": "git commit -m \"build(release): publish\" ./lib/index.d.ts & echo postpublish:git:commit",
73
- "ncu": "yarn-tool ncu -u",
74
- "sort-package-json": "yarn-tool sort",
75
- "ts:check": "tsc -p tsconfig.check.json --emitDeclarationOnly --skipLibCheck",
76
- "tsc:showConfig": "ynpx get-current-tsconfig -p"
77
- },
78
- "tsd": {
79
- "compilerOptions": {
80
- "skipLibCheck": true,
81
- "emitDeclarationOnly": true,
82
- "noUnusedParameters": false,
83
- "allowUnusedLabels": true,
84
- "noUnusedLocals": false,
85
- "noPropertyAccessFromIndexSignature": false
86
- },
87
- "directory": "test/spec",
88
- "testFiles": [
89
- "test/spec/**/*.ts"
90
- ]
91
- },
92
- "dependencies": {
93
- "@types/node": "*",
94
- "tslib": ">=2",
95
- "typedarray-dts": "^1.0.0"
96
- },
97
- "peerDependencies": {
98
- "ts-toolbelt": "^9.6.0"
99
- },
100
- "gitHead": "8733c903bb32e26825606684e3f2e29726775f01"
101
- }