I am trying to read the source code of the Turbo library and came across the following code:
export class FrameElement extends HTMLElement {
static delegateConstructor: new (element: FrameElement) => FrameElementDelegate
}
I understand it's creating a static property named delegateConstructor on the FrameElement class, and the expression new (element: FrameElement) => FrameElementDelegate is the type of delegateConstructor.
I don't understand what type this expression represents and what purpose that line is trying to achieve? Is delegateConstructor a function that takes a FrameElement and returns a FrameElementDelegate? Also, what's the use of the new keyword in this context?