Socket
Socket
Sign inDemoInstall

@types/qs

Package Overview
Dependencies
0
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.9.12 to 6.9.13

36

qs/index.d.ts

@@ -8,3 +8,5 @@ export = QueryString;

interface IStringifyOptions {
type BooleanOptional = boolean | undefined;
interface IStringifyBaseOptions {
delimiter?: string | undefined;

@@ -15,4 +17,4 @@ strictNullHandling?: boolean | undefined;

encoder?:
| ((str: any, defaultEncoder: defaultEncoder, charset: string, type: "key" | "value") => string)
| undefined;
| ((str: any, defaultEncoder: defaultEncoder, charset: string, type: "key" | "value") => string)
| undefined;
filter?: Array<string | number> | ((prefix: string, value: any) => any) | undefined;

@@ -26,3 +28,2 @@ arrayFormat?: "indices" | "brackets" | "repeat" | "comma" | undefined;

addQueryPrefix?: boolean | undefined;
allowDots?: boolean | undefined;
charset?: "utf-8" | "iso-8859-1" | undefined;

@@ -32,3 +33,9 @@ charsetSentinel?: boolean | undefined;

interface IParseOptions {
type IStringifyDynamicOptions<AllowDots extends BooleanOptional> = AllowDots extends true
? { allowDots?: AllowDots, encodeDotInKeys?: boolean }
: { allowDots?: boolean, encodeDotInKeys?: false }
type IStringifyOptions<AllowDots extends BooleanOptional = undefined> = IStringifyBaseOptions & IStringifyDynamicOptions<AllowDots>
interface IParseBaseOptions {
comma?: boolean | undefined;

@@ -38,7 +45,6 @@ delimiter?: string | RegExp | undefined;

decoder?:
| ((str: string, defaultDecoder: defaultDecoder, charset: string, type: "key" | "value") => any)
| undefined;
| ((str: string, defaultDecoder: defaultDecoder, charset: string, type: "key" | "value") => any)
| undefined;
arrayLimit?: number | undefined;
parseArrays?: boolean | undefined;
allowDots?: boolean | undefined;
plainObjects?: boolean | undefined;

@@ -53,4 +59,12 @@ allowPrototypes?: boolean | undefined;

interpretNumericEntities?: boolean | undefined;
allowEmptyArrays?: boolean | undefined;
duplicates?: 'combine' | 'first' | 'last' | undefined;
}
type IParseDynamicOptions<AllowDots extends BooleanOptional> = AllowDots extends true
? { allowDots?: AllowDots, decodeDotInKeys?: boolean }
: { allowDots?: boolean, decodeDotInKeys?: false }
type IParseOptions<AllowDots extends BooleanOptional = undefined> = IParseBaseOptions & IParseDynamicOptions<AllowDots>
interface ParsedQs {

@@ -60,5 +74,5 @@ [key: string]: undefined | string | string[] | ParsedQs | ParsedQs[];

function stringify(obj: any, options?: IStringifyOptions): string;
function parse(str: string, options?: IParseOptions & { decoder?: never | undefined }): ParsedQs;
function parse(str: string | Record<string, string>, options?: IParseOptions): { [key: string]: unknown };
function stringify(obj: any, options?: IStringifyOptions<BooleanOptional>): string;
function parse(str: string, options?: IParseOptions<BooleanOptional> & { decoder?: never | undefined }): ParsedQs;
function parse(str: string | Record<string, string>, options?: IParseOptions<BooleanOptional>): { [key: string]: unknown };
}
{
"name": "@types/qs",
"version": "6.9.12",
"version": "6.9.13",
"description": "TypeScript definitions for qs",

@@ -63,4 +63,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/qs",

"dependencies": {},
"typesPublisherContentHash": "5fedfdf3039bda4d290d252e351dbac564e0e82461e995f5f0db05ae2f93f46a",
"typeScriptVersion": "4.6"
"typesPublisherContentHash": "3f7e2ee4ebf0be590fb4d4090adb4a99e54efe73ff69ce25e4e9c454fa15405b",
"typeScriptVersion": "4.7"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Tue, 27 Feb 2024 19:35:42 GMT
* Last updated: Mon, 18 Mar 2024 19:06:42 GMT
* Dependencies: none

@@ -14,0 +14,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc