#zk program example gives typescript error on latest o1js

11 messages · Page 1 of 1 (latest)

marsh saffron
#

simple example mentioned at https://docs.minaprotocol.com/zkapps/o1js/recursion gives typescript error. it would be great if someone can tell how to fix it with the latest version.
Error:

Type '(publicInput: Field) => void' is not assignable to type '(...args: TupleToInstances<[]>) => void'.
  Types of parameters 'publicInput' and 'args' are incompatible.
    Property '0' is missing in type '[] & any[]' but required in type '[publicInput: Field]'.ts(2322)
proof_system.d.ts(227, 5): The expected type comes from property 'method' which is declared here on type '{ privateInputs: []; method(...args: TupleToInstances<[]>): void; }'

Website for documentation about Mina Protocol

compact wave
#

Hey

marsh saffron
compact wave
#

Checking the issue

untold solar
#

try publicInput instead of publicInputType?

compact wave
marsh saffron
#

Thanks this works!

teal radish
#

I think the docs have always been wrong lol

compact wave
#

Let’s see

compact wave