@murky-web/typebuddy 3.0.1 → 3.1.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/README.md +20 -7
- package/dist/oxlint.js +2 -0
- package/dist/rules/async_rule.js +18 -1
- package/dist/rules/maybe_promise_rule.js +25 -7
- package/dist/rules/maybe_rule.js +5 -2
- package/dist/rules/nullable_rule.js +5 -2
- package/dist/rules/optional_rule.js +5 -2
- package/dist/rules/useless_undefined_rule.js +512 -0
- package/jsr.json +1 -1
- package/oxlint/index.ts +5 -1
- package/package.json +3 -3
- package/rules/async_rule.ts +28 -1
- package/rules/maybe_promise_rule.ts +27 -7
- package/rules/maybe_rule.ts +7 -3
- package/rules/nullable_rule.ts +6 -3
- package/rules/optional_rule.ts +6 -3
- package/rules/useless_undefined_rule.ts +982 -0
- package/src/result.ts +0 -2
package/src/result.ts
CHANGED
|
@@ -35,7 +35,6 @@ function isSuccess<R extends Readonly<Result<unknown>>>(
|
|
|
35
35
|
/** Creates a successful result object for MaybePromise-style flows. */
|
|
36
36
|
function ok(): Success<void>;
|
|
37
37
|
function ok<T>(value: T): Success<T>;
|
|
38
|
-
// oxlint-disable-next-line typescript-eslint/prefer-readonly-parameter-types -- ok() intentionally accepts arbitrary payload values, including mutable ones.
|
|
39
38
|
function ok<T>(...args: readonly [T] | []): Success<T | void> {
|
|
40
39
|
const [value] = args;
|
|
41
40
|
return {
|
|
@@ -47,7 +46,6 @@ function ok<T>(...args: readonly [T] | []): Success<T | void> {
|
|
|
47
46
|
/** Creates the default failed result object for MaybePromise-style flows. */
|
|
48
47
|
function err(): Failed;
|
|
49
48
|
function err<T extends null>(value: T): Failed<T>;
|
|
50
|
-
// oxlint-disable-next-line typescript-eslint/prefer-readonly-parameter-types -- err() mirrors ok() and accepts the caller's payload shape without forcing readonly wrappers.
|
|
51
49
|
function err<T extends null>(...args: readonly [T] | []): Failed {
|
|
52
50
|
const [value] = args;
|
|
53
51
|
return {
|