Skip to content

Commit

Permalink
add NoInfer to all precomputed returns
Browse files Browse the repository at this point in the history
  • Loading branch information
ssalbdivad committed Sep 17, 2024
1 parent f3555db commit 69298e4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions ark/type/methods/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,15 @@ interface Type<out t = unknown, $ = {}>
interface ChainedPipeSignature<t, $> {
<a extends Morph<distill.Out<t>>, r = instantiateType<inferPipes<t, [a]>, $>>(
a: a
): r
): NoInfer<r>
<
a extends Morph<distill.Out<t>>,
b extends Morph<inferMorphOut<a>>,
r = instantiateType<inferPipes<t, [a, b]>, $>
>(
a: a,
b: b
): r
): NoInfer<r>
<
a extends Morph<distill.Out<t>>,
b extends Morph<inferMorphOut<a>>,
Expand All @@ -187,7 +187,7 @@ interface ChainedPipeSignature<t, $> {
a: a,
b: b,
c: c
): r
): NoInfer<r>
<
a extends Morph<distill.Out<t>>,
b extends Morph<inferMorphOut<a>>,
Expand All @@ -199,7 +199,7 @@ interface ChainedPipeSignature<t, $> {
b: b,
c: c,
d: d
): r
): NoInfer<r>
<
a extends Morph<distill.Out<t>>,
b extends Morph<inferMorphOut<a>>,
Expand All @@ -213,7 +213,7 @@ interface ChainedPipeSignature<t, $> {
c: c,
d: d,
e: e
): r
): NoInfer<r>
<
a extends Morph<distill.Out<t>>,
b extends Morph<inferMorphOut<a>>,
Expand All @@ -229,7 +229,7 @@ interface ChainedPipeSignature<t, $> {
d: d,
e: e,
f: f
): r
): NoInfer<r>
<
a extends Morph<distill.Out<t>>,
b extends Morph<inferMorphOut<a>>,
Expand All @@ -247,7 +247,7 @@ interface ChainedPipeSignature<t, $> {
e: e,
f: f,
g: g
): r
): NoInfer<r>
}

export interface ChainedPipes<t, $> extends ChainedPipeSignature<t, $> {
Expand Down
8 changes: 4 additions & 4 deletions ark/type/methods/object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ interface Type<out t extends object = object, $ = {}>

get<k1 extends arkKeyOf<t>, r = instantiateType<arkGet<t, k1>, $>>(
k1: k1 | type.cast<k1>
): r
): NoInfer<r>
get<
k1 extends arkKeyOf<t>,
k2 extends arkKeyOf<arkGet<t, k1>>,
r = instantiateType<arkGet<arkGet<t, k1>, k2>, $>
>(
k1: k1 | type.cast<k1>,
k2: k2 | type.cast<k2>
): r
): NoInfer<r>
get<
k1 extends arkKeyOf<t>,
k2 extends arkKeyOf<arkGet<t, k1>>,
Expand All @@ -57,7 +57,7 @@ interface Type<out t extends object = object, $ = {}>
k1: k1 | type.cast<k1>,
k2: k2 | type.cast<k2>,
k3: k3 | type.cast<k3>
): r
): NoInfer<r>

pick<const key extends arkKeyOf<t> = never>(
...keys: (key | type.cast<key>)[]
Expand Down Expand Up @@ -87,7 +87,7 @@ interface Type<out t extends object = object, $ = {}>

partial(): Type<{ [k in keyof t]?: t[k] }, $>

map<transformed extends listable<MappedTypeProp<Key, v>>, v = unknown>(
map<transformed extends listable<MappedTypeProp>>(
// v isn't used directly here but helps TS infer a precise type for transformed
flatMapEntry: (entry: typePropOf<t, $>) => transformed
): Type<constructMapped<t, transformed>, $>
Expand Down

0 comments on commit 69298e4

Please sign in to comment.