@tb-dev/utils 1.7.6 → 1.8.0
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/dist/panic.cjs +8 -5
- package/dist/panic.d.ts +4 -4
- package/dist/panic.js +8 -5
- package/package.json +5 -5
package/dist/panic.cjs
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
function panic(
|
|
4
|
-
throw new Error(
|
|
3
|
+
function panic(...args) {
|
|
4
|
+
throw new Error(args[0]);
|
|
5
5
|
}
|
|
6
|
-
function todo(
|
|
6
|
+
function todo(...args) {
|
|
7
|
+
const message = typeof args[0] === "string" ? args[0] : "todo";
|
|
7
8
|
panic(message);
|
|
8
9
|
}
|
|
9
|
-
function unimplemented(
|
|
10
|
+
function unimplemented(...args) {
|
|
11
|
+
const message = typeof args[0] === "string" ? args[0] : "not implemented";
|
|
10
12
|
panic(message);
|
|
11
13
|
}
|
|
12
|
-
function unreachable(
|
|
14
|
+
function unreachable(...args) {
|
|
15
|
+
const message = typeof args[0] === "string" ? args[0] : "unreachable";
|
|
13
16
|
panic(message);
|
|
14
17
|
}
|
|
15
18
|
exports.panic = panic;
|
package/dist/panic.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function panic(
|
|
2
|
-
export declare function todo(
|
|
3
|
-
export declare function unimplemented(
|
|
4
|
-
export declare function unreachable(
|
|
1
|
+
export declare function panic(...args: any[]): never;
|
|
2
|
+
export declare function todo(...args: any[]): never;
|
|
3
|
+
export declare function unimplemented(...args: any[]): never;
|
|
4
|
+
export declare function unreachable(...args: any[]): never;
|
package/dist/panic.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
function panic(
|
|
2
|
-
throw new Error(
|
|
1
|
+
function panic(...args) {
|
|
2
|
+
throw new Error(args[0]);
|
|
3
3
|
}
|
|
4
|
-
function todo(
|
|
4
|
+
function todo(...args) {
|
|
5
|
+
const message = typeof args[0] === "string" ? args[0] : "todo";
|
|
5
6
|
panic(message);
|
|
6
7
|
}
|
|
7
|
-
function unimplemented(
|
|
8
|
+
function unimplemented(...args) {
|
|
9
|
+
const message = typeof args[0] === "string" ? args[0] : "not implemented";
|
|
8
10
|
panic(message);
|
|
9
11
|
}
|
|
10
|
-
function unreachable(
|
|
12
|
+
function unreachable(...args) {
|
|
13
|
+
const message = typeof args[0] === "string" ? args[0] : "unreachable";
|
|
11
14
|
panic(message);
|
|
12
15
|
}
|
|
13
16
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tb-dev/utils",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "TypeScript utils",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
"@tb-dev/utility-types": "^1.3.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@tb-dev/eslint-config": "^3.7.
|
|
33
|
+
"@tb-dev/eslint-config": "^3.7.2",
|
|
34
34
|
"@types/node": "^20.14.2",
|
|
35
35
|
"eslint": "^8.57.0",
|
|
36
36
|
"husky": "^9.0.11",
|
|
37
|
-
"lint-staged": "^15.2.
|
|
38
|
-
"prettier": "^3.3.
|
|
37
|
+
"lint-staged": "^15.2.6",
|
|
38
|
+
"prettier": "^3.3.2",
|
|
39
39
|
"tslib": "^2.6.3",
|
|
40
40
|
"typedoc": "^0.25.13",
|
|
41
|
-
"typedoc-plugin-mdn-links": "^3.1.
|
|
41
|
+
"typedoc-plugin-mdn-links": "^3.1.29",
|
|
42
42
|
"typescript": "^5.4.5",
|
|
43
43
|
"vite": "^5.2.13",
|
|
44
44
|
"vite-plugin-dts": "^3.9.1"
|