I am new to react ( native) and typescript and do not fully understand what is the correct syntax for the below example from https://www.typescriptlang.org/docs/handbook/2/functions.html Call Signature
it is working in https://www.typescriptlang.org/ but also have warnings
type printFunction = { name : string, (a: string) : void}function greeter( fn: printFunction ) { fn.a("Hello " + fn.name);}function printToConsole(s: string) { console.log(s);}greeter({name:"Henk", a:printToConsole});
if some one can shine some light it will be appreciated