UNPKG

@mdui/jq

Version:

拥有和 jQuery 相似 API 的轻量级 JavaScript 工具库

20 lines (18 loc) 451 B
import type { PlainObject } from '../shared/helper.js'; declare module '../shared/core.js' { interface JQ<T = HTMLElement> { /** * 在 $ 的原型链上扩展方法 * @param obj * @example ```js $.fn.extend({ customFunc: function () {} }) // 然后就可以这样使用扩展的方法了 $(document).customFunc() ``` */ extend(obj: PlainObject): this; } }