What is the type of a jQuery object in TypeScript?

前端 未结 1 1171
迷失自我
迷失自我 2021-02-12 17:51

This is going to be a really short one.

I\'m just wondering what type I should use for jQuery elements?

Without jQuery I go on like this:

export          


        
相关标签:
1条回答
  • 2021-02-12 18:33

    After installing the types needed (npm install --save-dev @types/jquery), you can type it as just JQuery:

    constructor(protected element: JQuery) {
    
    }
    
    0 讨论(0)
提交回复
热议问题