Syntax for an array of closures?

Topics: General
Sep 12, 2013 at 1:31 PM
I'm trying to figure out the syntax to specify that a function returns an array of closures.
public get(): (any) => void[]; // A closure returning an array of void

public get(): ((any) => void)[]; // Syntax error
Is there a syntax to achieve this?
Sep 12, 2013 at 1:53 PM
This will do it:
public get(): { (x: any): void }[];
The => syntax is just shorthand for an object type with a single call signature.