Struggling to grasp the correct syntax, I am looking to incorporate an interface into my project.
The desired interface for implementation is as follows:
interface Test {
[name : string] : (source : string) => void;
}
My understanding is that this interface essentially consists of a object with strings as keys and functions as values.
Any guidance on this matter would be greatly appreciated.
Edit : Encountering multiple errors such as "incorrect implementation of interface", "index signature is missing", etc,
For a demonstration, refer to this playground example: Link
I did not write the implementation code for this interface, it comes from a preexisting sdk