@types/append-query
TypeScript icon, indicating that this package has built-in type declarations

2.0.3 • Public • Published

Installation

npm install --save @types/append-query

Summary

This package contains type definitions for append-query (https://github.com/lakenen/node-append-query).

Details

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

index.d.ts

declare namespace appendQuery {
    interface Query {
        [index: string]: string | null;
    }

    interface Options {
        /**
         * whether or not to encode appended passed params using `encodeURIComponent`.
         * Default: `true`.
         */
        encodeComponents?: boolean | undefined;
        /**
         * whether or not to remove params for `null` properties in the query object.
         * Default: `false` (properties will be preserved with no value).
         */
        removeNull?: boolean | undefined;
    }
}

/**
 * @param url a string URL to append to
 * @param query a string or object containing query params to append
 */
declare function appendQuery(url: string, query: string | appendQuery.Query, options?: appendQuery.Options): string;

export = appendQuery;

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:04 GMT
  • Dependencies: none

Credits

These definitions were written by Florian Keller.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/append-query

Weekly Downloads

3,379

Version

2.0.3

License

MIT

Unpacked Size

4.18 kB

Total Files

5

Last publish

Collaborators

  • types