e.g. $('div')
in the DefinitelyTyped jquery.d.ts is named JQuery
.
How do I reference a jQuery selector using TypeScript and DefinitelyTyped?
-
22-06-2023 - |
Domanda
I'm creating a method in TypeScript that should receive a jQuery selector as a parameter and I want to make it strongly typed by using DefinitelyTyped. How should my method be like?
Example:
class Foo {
constructor($el: jQuerySelector) {
}
}
What should I replace jQuerySelector
with?
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow