@ts-type/unpacked 1.0.3 → 1.0.6
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 +26 -0
- package/package.json +3 -3
- package/index.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,32 @@
|
|
|
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
|
+
## [1.0.6](https://github.com/bluelovers/ws-ts-type/compare/@ts-type/unpacked@1.0.4...@ts-type/unpacked@1.0.6) (2026-03-07)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### 🔖 Miscellaneous
|
|
11
|
+
|
|
12
|
+
* . ([6328603](https://github.com/bluelovers/ws-ts-type/commit/6328603d30d4af3cf84aefa466f566a127adb2cb))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [1.0.5](https://github.com/bluelovers/ws-ts-type/compare/@ts-type/unpacked@1.0.4...@ts-type/unpacked@1.0.5) (2026-03-07)
|
|
17
|
+
|
|
18
|
+
**Note:** Version bump only for package @ts-type/unpacked
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## [1.0.4](https://github.com/bluelovers/ws-ts-type/compare/@ts-type/unpacked@1.0.3...@ts-type/unpacked@1.0.4) (2026-03-07)
|
|
25
|
+
|
|
26
|
+
**Note:** Version bump only for package @ts-type/unpacked
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
6
32
|
## [1.0.3](https://github.com/bluelovers/ws-ts-type/compare/@ts-type/unpacked@1.0.2...@ts-type/unpacked@1.0.3) (2026-03-07)
|
|
7
33
|
|
|
8
34
|
**Note:** Version bump only for package @ts-type/unpacked
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ts-type/unpacked",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "類型解包裝工具,從複雜類型中提取內部類型 | Type unpacking utilities to extract inner types from complex types",
|
|
5
5
|
"keywords": [
|
|
6
6
|
".d.ts",
|
|
@@ -83,10 +83,10 @@
|
|
|
83
83
|
"tsc:showConfig": "ynpx get-current-tsconfig -p"
|
|
84
84
|
},
|
|
85
85
|
"dependencies": {
|
|
86
|
-
"ts-type": "^3.0.
|
|
86
|
+
"ts-type": "^3.0.7"
|
|
87
87
|
},
|
|
88
88
|
"publishConfig": {
|
|
89
89
|
"access": "public"
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "fa1d461d70669aad17f322801a5fde844b2e0c73"
|
|
92
92
|
}
|
package/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"","sourcesContent":["import { ITSMapLike, ITSResolvable, ITSTypeFunction } from 'ts-type/lib/generic';\n\n/**\n * 取得函式回傳類型的未包裝類型\n * Get unpacked type of function return type\n *\n * @typeParam T - 函式類型 / Function type\n */\nexport type ITSUnpackedReturnType<T extends (...args: any[]) => any> =\n\tITSUnpacked<ReturnType<T>>\n//\tT extends ITSTypeFunction<infer R>\n//\t\t? ITSUnpacked<R>\n//\t\t: T\n\t;\n\n/**\n * 解包裝類型 - 從各種包裝類型中提取內部類型\n * Unpack type - Extract inner type from various wrapper types\n *\n * 支援解包裝:\n * - Map, WeakMap, Set, WeakSet 等 MapLike 類型\n * - 陣列 / Array\n * - ArrayLike\n * - Iterator / IteratorResult\n * - 函式\n * - 可解析類型(Promise, Thenable)\n *\n * @see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html\n * @typeParam T - 要解包裝的類型 / Type to unpack\n */\nexport type ITSUnpacked<T> =\n\tT extends ITSMapLike<any, infer U> ? U :\n\t\tT extends (infer U)[] ? U :\n\t\t\tT extends ArrayLike<infer U> ? U :\n\t\t\t\tT extends Iterator<infer U> ? U :\n\t\t\t\t\tT extends IteratorResult<infer U> ? U :\n\t\t\t\t\t\tT extends ITSTypeFunction<infer U> ? U :\n\t\t\t\t\t\t\tT extends ITSResolvable<infer U> ? U :\n\t\t\t\t\t\t\t\t//T extends Promise<infer U> ? U :\n\t\t\t\t\t\t\t\tT\n\t;\n\n/**\n * 解包裝可 Promise 或 Thenable 類型\n * Unpack Promise or Thenable type\n *\n * @typeParam T - 要解包裝的類型 / Type to unpack\n */\nexport type ITSUnpackedPromiseLike<T> =\n\tT extends ITSResolvable<infer U> ? U :\n\t\tT\n\t;\n\n/**\n * 解包裝 Iterator 或 IteratorResult 類型\n * Unpack Iterator or IteratorResult type\n *\n * @typeParam T - Iterator 相關類型 / Iterator-related type\n */\nexport type ITSUnpackedIteratorLike<T extends Iterator<any> | IteratorResult<any>> =\n\tT extends Iterator<infer U> ? U :\n\t\tT extends IteratorYieldResult<infer U> ? U :\n\t\t\t\tnever\n\t;\n\n/**\n * 解包裝類陣列或陣列類型\n * Unpack array-like or array type\n *\n * @typeParam T - 陣列類型 / Array type\n */\nexport type ITSUnpackedArrayLike<T extends ArrayLike<any> | any[]> =\n\tT extends (infer U)[] ? ITSUnpacked<U> :\n\t\tT extends readonly (infer U)[] ? ITSUnpacked<U> :\n\t\t\tT extends ArrayLike<infer U> ? ITSUnpacked<U> :\n\t\t\t\tT\n\t;\n\n/**\n * 取得函式的 this 參數類型\n * Get the this parameter type of a function\n *\n * @typeParam T - 函式類型 / Function type\n */\nexport type ITSUnpackedThisFunction<T extends (...args: any[]) => any> =\n\tT extends (this: infer R, ...args: any[]) => any\n\t\t? R\n\t\t: unknown;\n"]}
|