Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Calculator

0

72
Views
What does the following TypeScript static property expression mean?

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
}

link

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?

7 months ago ยท Juan Pablo Isaza
Answer question
Find remote jobs