UNPKG

@mdui/jq

Version:

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

21 lines (20 loc) 498 B
import type { Options } from '../shared/ajax.js'; declare module '../shared/core.js' { interface JQStatic { /** * 发送 ajax 请求 * @param options * @example ```js ajax({ method: "POST", url: "some.php", data: { name: "John", location: "Boston" } }).then(function( msg ) { alert( "Data Saved: " + msg ); }); ``` */ ajax<TResponse = any>(options: Options<TResponse>): Promise<TResponse>; } }