diff --git a/src/keccakf.test-d.ts b/src/keccakf.test-d.ts index bac46ed..28f2196 100644 --- a/src/keccakf.test-d.ts +++ b/src/keccakf.test-d.ts @@ -51,7 +51,60 @@ test("_KeccakF", () => { // ^? assertType>([] as unknown as t); + assertType([] as unknown as Word1); + assertType([] as unknown as Word1); + assertType([] as unknown as Word0); assertType([] as unknown as Call); + assertType([] as unknown as Word0); + assertType([] as unknown as Call); + assertType([] as unknown as Word0); + assertType([] as unknown as Call); + assertType([] as unknown as Word0); + assertType([] as unknown as Call); + + assertType([] as unknown as Word0); + assertType([] as unknown as Call); + assertType([] as unknown as Word0); + assertType([] as unknown as Word0); + assertType([] as unknown as Word0); + assertType([] as unknown as Call); + assertType([] as unknown as Word0); + assertType([] as unknown as Call); + assertType([] as unknown as Word0); + assertType([] as unknown as Word0); + + assertType([] as unknown as Word0); + assertType([] as unknown as Call); + assertType([] as unknown as Word0); + assertType([] as unknown as Word0); + assertType([] as unknown as Word0); + assertType([] as unknown as Call); + assertType([] as unknown as Word0); + assertType([] as unknown as Word0); + assertType([] as unknown as Word0); + assertType([] as unknown as Call); + + assertType([] as unknown as Word0); + assertType([] as unknown as Word0); + assertType([] as unknown as Call); + assertType([] as unknown as Word0); + assertType([] as unknown as Call); + assertType([] as unknown as Word0); + assertType([] as unknown as Word0); + assertType([] as unknown as Word0); + assertType([] as unknown as Call); + assertType([] as unknown as Word0); + + assertType([] as unknown as Word0); + assertType([] as unknown as Word0); + assertType([] as unknown as Call); + assertType([] as unknown as Word0); + assertType([] as unknown as Word0); + assertType([] as unknown as Word0); + assertType([] as unknown as Call); + assertType([] as unknown as Word0); + assertType([] as unknown as Call); + assertType([] as unknown as Word0); }); test("KeccakF", () => { diff --git a/src/keccakf.ts b/src/keccakf.ts index 90ebb96..4198361 100644 --- a/src/keccakf.ts +++ b/src/keccakf.ts @@ -215,7 +215,7 @@ export interface RhoAndPi extends Fn { Call, Call, Call, - Call, + Call, Call, Call, Call, @@ -397,9 +397,9 @@ export interface Iota extends Fn { */ export interface _KeccakF extends Fn { return: this["args"] extends [infer s extends S, infer round extends Round[number]] - ? Call extends infer a extends S - ? Call extends infer b extends S - ? Call extends infer c extends S + ? Call extends infer a + ? Call extends infer b + ? Call extends infer c ? Call : never : never