npm.io
0.2.34 • Published 2 years ago

@types/nanoajax

Licence
MIT
Version
0.2.34
Deps
0
Size
3 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/nanoajax

Summary

This package contains type definitions for nanoajax (https://github.com/yanatan16/nanoajax).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nanoajax.

index.d.ts

interface RequestParameters {
    url: string;
    headers?: { [key: string]: string } | undefined;
    body?: string | FormData | undefined;
    method?: string | undefined;
    cors?: boolean | undefined;
}

interface Callback {
    (statusCode: number, response: string, request: XMLHttpRequest): any;
}

export declare function ajax(params: RequestParameters, callback: Callback): XMLHttpRequest;

Additional Details

  • Last updated: Tue, 07 Nov 2023 0939 GMT
  • Dependencies: none

Credits

These definitions were written by Nathan Cahill.