🔥 Drop unused unified-signature disables
This commit is contained in:
1 parent
78e9af600d
commit
3f22e5ca01
1 file changed
-4
@@ -64,7 +64,6 @@ type MustBePartial<T extends object, K extends keyof T, Handled> =
|
|||||||
// TypeScript does not apply the excess-property check to a generic constraint,
|
// TypeScript does not apply the excess-property check to a generic constraint,
|
||||||
// so `Exact` restores it for the generic forms.
|
// so `Exact` restores it for the generic forms.
|
||||||
|
|
||||||
// oxlint-disable typescript/unified-signatures
|
|
||||||
// Strict returns: one common `R`. Overload order is load-bearing:
|
// Strict returns: one common `R`. Overload order is load-bearing:
|
||||||
// #1 Handlers (first) -> the exhaustive form and the autocomplete popup
|
// #1 Handlers (first) -> the exhaustive form and the autocomplete popup
|
||||||
// #2 Fallback (last) -> accepts a partial handler map plus a fallback
|
// #2 Fallback (last) -> accepts a partial handler map plus a fallback
|
||||||
@@ -79,12 +78,10 @@ interface TaggedUnionMatcherStrict<T extends object, K extends keyof T> {
|
|||||||
fallback: Fallback<T, K, Handled, R>,
|
fallback: Fallback<T, K, Handled, R>,
|
||||||
): UnaryFn<T, R>;
|
): UnaryFn<T, R>;
|
||||||
}
|
}
|
||||||
// oxlint-enable typescript/unified-signatures
|
|
||||||
|
|
||||||
// Widened returns: the union of every handler's return type. `P` is inferred
|
// Widened returns: the union of every handler's return type. `P` is inferred
|
||||||
// from the whole handler map, whose closed constraint supplies the
|
// from the whole handler map, whose closed constraint supplies the
|
||||||
// contextual/autocomplete type.
|
// contextual/autocomplete type.
|
||||||
// oxlint-disable typescript/unified-signatures
|
|
||||||
interface TaggedUnionMatcherWidening<T extends object, K extends keyof T> {
|
interface TaggedUnionMatcherWidening<T extends object, K extends keyof T> {
|
||||||
<P extends Exact<Handlers<T, K, unknown>, P>>(
|
<P extends Exact<Handlers<T, K, unknown>, P>>(
|
||||||
handlers: P,
|
handlers: P,
|
||||||
@@ -98,7 +95,6 @@ interface TaggedUnionMatcherWidening<T extends object, K extends keyof T> {
|
|||||||
fallback: Fallback<T, K, Handled, R>,
|
fallback: Fallback<T, K, Handled, R>,
|
||||||
): UnaryFn<T, PatternReturns<Handled> | R>;
|
): UnaryFn<T, PatternReturns<Handled> | R>;
|
||||||
}
|
}
|
||||||
// oxlint-enable typescript/unified-signatures
|
|
||||||
|
|
||||||
type HandlerMap = Record<string | number, UnaryFn<never, unknown> | undefined>;
|
type HandlerMap = Record<string | number, UnaryFn<never, unknown> | undefined>;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user