fix(typescript-axios): Ignore unused parameter on JSON serializer replacer function (#22858)

This commit is contained in:
Rens Groothuijsen
2026-02-03 06:08:08 +01:00
committed by GitHub
parent 95911180f6
commit 2ab70fa46b
16 changed files with 32 additions and 16 deletions

View File

@@ -110,7 +110,8 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
*/
export const replaceWithSerializableTypeIfNeeded = function(key: any, value: any) {
// @ts-ignore
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
if (value instanceof Set) {
return Array.from(value);
} else {

View File

@@ -96,7 +96,8 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
*/
export const replaceWithSerializableTypeIfNeeded = function(key: any, value: any) {
// @ts-ignore
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
if (value instanceof Set) {
return Array.from(value);
} else {

View File

@@ -96,7 +96,8 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
*/
export const replaceWithSerializableTypeIfNeeded = function(key: any, value: any) {
// @ts-ignore
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
if (value instanceof Set) {
return Array.from(value);
} else {

View File

@@ -96,7 +96,8 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
*/
export const replaceWithSerializableTypeIfNeeded = function(key: any, value: any) {
// @ts-ignore
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
if (value instanceof Set) {
return Array.from(value);
} else {

View File

@@ -96,7 +96,8 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
*/
export const replaceWithSerializableTypeIfNeeded = function(key: any, value: any) {
// @ts-ignore
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
if (value instanceof Set) {
return Array.from(value);
} else {

View File

@@ -96,7 +96,8 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
*/
export const replaceWithSerializableTypeIfNeeded = function(key: any, value: any) {
// @ts-ignore
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
if (value instanceof Set) {
return Array.from(value);
} else {

View File

@@ -96,7 +96,8 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
*/
export const replaceWithSerializableTypeIfNeeded = function(key: any, value: any) {
// @ts-ignore
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
if (value instanceof Set) {
return Array.from(value);
} else {

View File

@@ -96,7 +96,8 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
*/
export const replaceWithSerializableTypeIfNeeded = function(key: any, value: any) {
// @ts-ignore
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
if (value instanceof Set) {
return Array.from(value);
} else {

View File

@@ -96,7 +96,8 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
*/
export const replaceWithSerializableTypeIfNeeded = function(key: any, value: any) {
// @ts-ignore
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
if (value instanceof Set) {
return Array.from(value);
} else {

View File

@@ -96,7 +96,8 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
*/
export const replaceWithSerializableTypeIfNeeded = function(key: any, value: any) {
// @ts-ignore
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
if (value instanceof Set) {
return Array.from(value);
} else {

View File

@@ -96,7 +96,8 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
*/
export const replaceWithSerializableTypeIfNeeded = function(key: any, value: any) {
// @ts-ignore
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
if (value instanceof Set) {
return Array.from(value);
} else {

View File

@@ -97,7 +97,8 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
*/
export const replaceWithSerializableTypeIfNeeded = function(key: any, value: any) {
// @ts-ignore
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
if (value instanceof Set) {
return Array.from(value);
} else {

View File

@@ -96,7 +96,8 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
*/
export const replaceWithSerializableTypeIfNeeded = function(key: any, value: any) {
// @ts-ignore
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
if (value instanceof Set) {
return Array.from(value);
} else {

View File

@@ -96,7 +96,8 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
*/
export const replaceWithSerializableTypeIfNeeded = function(key: any, value: any) {
// @ts-ignore
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
if (value instanceof Set) {
return Array.from(value);
} else {

View File

@@ -96,7 +96,8 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
*/
export const replaceWithSerializableTypeIfNeeded = function(key: any, value: any) {
// @ts-ignore
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
if (value instanceof Set) {
return Array.from(value);
} else {

View File

@@ -96,7 +96,8 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
*/
export const replaceWithSerializableTypeIfNeeded = function(key: any, value: any) {
// @ts-ignore
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
if (value instanceof Set) {
return Array.from(value);
} else {