@types/simple-query-string

TypeScript definitions for simple-query-string

Usage no npm install needed!

<script type="module">
  import typesSimpleQueryString from 'https://cdn.skypack.dev/@types/simple-query-string';
</script>

README

Installation

npm install --save @types/simple-query-string

Summary

This package contains type definitions for simple-query-string (https://github.com/khalidsalomao/simple-query-string#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/simple-query-string.

index.d.ts

// Type definitions for simple-query-string 1.3
// Project: https://github.com/khalidsalomao/simple-query-string#readme
// Definitions by: Ciarán Ingle <https://github.com/inglec-arista>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.6

declare const qs: {
    version: string;

    parse: (
        str: string,
        delimeter?: string,
        eq?: string,
    ) => {
        [key: string]: string | string[] | null;
    };

    stringify: <T>(
        obj: {
            /* tslint:disable-next-line ban-types */
            [key: string]: T extends Function
                ? never
                : T extends string | number | boolean | object | null | undefined
                ? T
                : never;
        },
        delimeter?: string,
        eq?: string,
    ) => string;
};

export = qs;

Additional Details

  • Last updated: Fri, 28 May 2021 16:01:26 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Ciarán Ingle.