fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

test(openapi-ts-tests): update axios snapshots for TS2578 fix

+92 -69
+4 -3
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts
··· 35 35 return getConfig(); 36 36 }; 37 37 38 - const beforeRequest = async (options: RequestOptions) => { 38 + const beforeRequest = async <TData = unknown, Url extends string = string>( 39 + options: RequestOptions<TData, boolean, Url>, 40 + ) => { 39 41 const opts = { 40 42 ..._config, 41 43 ...options, ··· 58 60 opts.body = opts.bodySerializer(opts.body); 59 61 } 60 62 61 - const url = buildUrl(opts); 63 + const url = buildUrl(opts as RequestOptions<unknown, boolean, string>); 62 64 63 65 return { opts, url }; 64 66 }; 65 67 66 68 // @ts-expect-error 67 69 const request: Client['request'] = async (options) => { 68 - // @ts-expect-error 69 70 const { opts, url } = await beforeRequest(options); 70 71 try { 71 72 // assign Axios here for consistency with fetch
+4 -3
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/preact-query/axios/client/client.gen.ts
··· 35 35 return getConfig(); 36 36 }; 37 37 38 - const beforeRequest = async (options: RequestOptions) => { 38 + const beforeRequest = async <TData = unknown, Url extends string = string>( 39 + options: RequestOptions<TData, boolean, Url>, 40 + ) => { 39 41 const opts = { 40 42 ..._config, 41 43 ...options, ··· 58 60 opts.body = opts.bodySerializer(opts.body); 59 61 } 60 62 61 - const url = buildUrl(opts); 63 + const url = buildUrl(opts as RequestOptions<unknown, boolean, string>); 62 64 63 65 return { opts, url }; 64 66 }; 65 67 66 68 // @ts-expect-error 67 69 const request: Client['request'] = async (options) => { 68 - // @ts-expect-error 69 70 const { opts, url } = await beforeRequest(options); 70 71 try { 71 72 // assign Axios here for consistency with fetch
+4 -3
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/client.gen.ts
··· 35 35 return getConfig(); 36 36 }; 37 37 38 - const beforeRequest = async (options: RequestOptions) => { 38 + const beforeRequest = async <TData = unknown, Url extends string = string>( 39 + options: RequestOptions<TData, boolean, Url>, 40 + ) => { 39 41 const opts = { 40 42 ..._config, 41 43 ...options, ··· 58 60 opts.body = opts.bodySerializer(opts.body); 59 61 } 60 62 61 - const url = buildUrl(opts); 63 + const url = buildUrl(opts as RequestOptions<unknown, boolean, string>); 62 64 63 65 return { opts, url }; 64 66 }; 65 67 66 68 // @ts-expect-error 67 69 const request: Client['request'] = async (options) => { 68 - // @ts-expect-error 69 70 const { opts, url } = await beforeRequest(options); 70 71 try { 71 72 // assign Axios here for consistency with fetch
+4 -3
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts
··· 35 35 return getConfig(); 36 36 }; 37 37 38 - const beforeRequest = async (options: RequestOptions) => { 38 + const beforeRequest = async <TData = unknown, Url extends string = string>( 39 + options: RequestOptions<TData, boolean, Url>, 40 + ) => { 39 41 const opts = { 40 42 ..._config, 41 43 ...options, ··· 58 60 opts.body = opts.bodySerializer(opts.body); 59 61 } 60 62 61 - const url = buildUrl(opts); 63 + const url = buildUrl(opts as RequestOptions<unknown, boolean, string>); 62 64 63 65 return { opts, url }; 64 66 }; 65 67 66 68 // @ts-expect-error 67 69 const request: Client['request'] = async (options) => { 68 - // @ts-expect-error 69 70 const { opts, url } = await beforeRequest(options); 70 71 try { 71 72 // assign Axios here for consistency with fetch
+4 -3
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts
··· 35 35 return getConfig(); 36 36 }; 37 37 38 - const beforeRequest = async (options: RequestOptions) => { 38 + const beforeRequest = async <TData = unknown, Url extends string = string>( 39 + options: RequestOptions<TData, boolean, Url>, 40 + ) => { 39 41 const opts = { 40 42 ..._config, 41 43 ...options, ··· 58 60 opts.body = opts.bodySerializer(opts.body); 59 61 } 60 62 61 - const url = buildUrl(opts); 63 + const url = buildUrl(opts as RequestOptions<unknown, boolean, string>); 62 64 63 65 return { opts, url }; 64 66 }; 65 67 66 68 // @ts-expect-error 67 69 const request: Client['request'] = async (options) => { 68 - // @ts-expect-error 69 70 const { opts, url } = await beforeRequest(options); 70 71 try { 71 72 // assign Axios here for consistency with fetch
+4 -3
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts
··· 35 35 return getConfig(); 36 36 }; 37 37 38 - const beforeRequest = async (options: RequestOptions) => { 38 + const beforeRequest = async <TData = unknown, Url extends string = string>( 39 + options: RequestOptions<TData, boolean, Url>, 40 + ) => { 39 41 const opts = { 40 42 ..._config, 41 43 ...options, ··· 58 60 opts.body = opts.bodySerializer(opts.body); 59 61 } 60 62 61 - const url = buildUrl(opts); 63 + const url = buildUrl(opts as RequestOptions<unknown, boolean, string>); 62 64 63 65 return { opts, url }; 64 66 }; 65 67 66 68 // @ts-expect-error 67 69 const request: Client['request'] = async (options) => { 68 - // @ts-expect-error 69 70 const { opts, url } = await beforeRequest(options); 70 71 try { 71 72 // assign Axios here for consistency with fetch
+4 -3
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/client/client.gen.ts
··· 35 35 return getConfig(); 36 36 }; 37 37 38 - const beforeRequest = async (options: RequestOptions) => { 38 + const beforeRequest = async <TData = unknown, Url extends string = string>( 39 + options: RequestOptions<TData, boolean, Url>, 40 + ) => { 39 41 const opts = { 40 42 ..._config, 41 43 ...options, ··· 58 60 opts.body = opts.bodySerializer(opts.body); 59 61 } 60 62 61 - const url = buildUrl(opts); 63 + const url = buildUrl(opts as RequestOptions<unknown, boolean, string>); 62 64 63 65 return { opts, url }; 64 66 }; 65 67 66 68 // @ts-expect-error 67 69 const request: Client['request'] = async (options) => { 68 - // @ts-expect-error 69 70 const { opts, url } = await beforeRequest(options); 70 71 try { 71 72 // assign Axios here for consistency with fetch
+4 -3
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/client/client.gen.ts
··· 35 35 return getConfig(); 36 36 }; 37 37 38 - const beforeRequest = async (options: RequestOptions) => { 38 + const beforeRequest = async <TData = unknown, Url extends string = string>( 39 + options: RequestOptions<TData, boolean, Url>, 40 + ) => { 39 41 const opts = { 40 42 ..._config, 41 43 ...options, ··· 58 60 opts.body = opts.bodySerializer(opts.body); 59 61 } 60 62 61 - const url = buildUrl(opts); 63 + const url = buildUrl(opts as RequestOptions<unknown, boolean, string>); 62 64 63 65 return { opts, url }; 64 66 }; 65 67 66 68 // @ts-expect-error 67 69 const request: Client['request'] = async (options) => { 68 - // @ts-expect-error 69 70 const { opts, url } = await beforeRequest(options); 70 71 try { 71 72 // assign Axios here for consistency with fetch
+4 -3
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts
··· 35 35 return getConfig(); 36 36 }; 37 37 38 - const beforeRequest = async (options: RequestOptions) => { 38 + const beforeRequest = async <TData = unknown, Url extends string = string>( 39 + options: RequestOptions<TData, boolean, Url>, 40 + ) => { 39 41 const opts = { 40 42 ..._config, 41 43 ...options, ··· 58 60 opts.body = opts.bodySerializer(opts.body); 59 61 } 60 62 61 - const url = buildUrl(opts); 63 + const url = buildUrl(opts as RequestOptions<unknown, boolean, string>); 62 64 63 65 return { opts, url }; 64 66 }; 65 67 66 68 // @ts-expect-error 67 69 const request: Client['request'] = async (options) => { 68 - // @ts-expect-error 69 70 const { opts, url } = await beforeRequest(options); 70 71 try { 71 72 // assign Axios here for consistency with fetch
+4 -3
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/axios/client/client.gen.ts
··· 35 35 return getConfig(); 36 36 }; 37 37 38 - const beforeRequest = async (options: RequestOptions) => { 38 + const beforeRequest = async <TData = unknown, Url extends string = string>( 39 + options: RequestOptions<TData, boolean, Url>, 40 + ) => { 39 41 const opts = { 40 42 ..._config, 41 43 ...options, ··· 58 60 opts.body = opts.bodySerializer(opts.body); 59 61 } 60 62 61 - const url = buildUrl(opts); 63 + const url = buildUrl(opts as RequestOptions<unknown, boolean, string>); 62 64 63 65 return { opts, url }; 64 66 }; 65 67 66 68 // @ts-expect-error 67 69 const request: Client['request'] = async (options) => { 68 - // @ts-expect-error 69 70 const { opts, url } = await beforeRequest(options); 70 71 try { 71 72 // assign Axios here for consistency with fetch
+4 -3
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/client/client.gen.ts
··· 35 35 return getConfig(); 36 36 }; 37 37 38 - const beforeRequest = async (options: RequestOptions) => { 38 + const beforeRequest = async <TData = unknown, Url extends string = string>( 39 + options: RequestOptions<TData, boolean, Url>, 40 + ) => { 39 41 const opts = { 40 42 ..._config, 41 43 ...options, ··· 58 60 opts.body = opts.bodySerializer(opts.body); 59 61 } 60 62 61 - const url = buildUrl(opts); 63 + const url = buildUrl(opts as RequestOptions<unknown, boolean, string>); 62 64 63 65 return { opts, url }; 64 66 }; 65 67 66 68 // @ts-expect-error 67 69 const request: Client['request'] = async (options) => { 68 - // @ts-expect-error 69 70 const { opts, url } = await beforeRequest(options); 70 71 try { 71 72 // assign Axios here for consistency with fetch
+4 -3
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts
··· 35 35 return getConfig(); 36 36 }; 37 37 38 - const beforeRequest = async (options: RequestOptions) => { 38 + const beforeRequest = async <TData = unknown, Url extends string = string>( 39 + options: RequestOptions<TData, boolean, Url>, 40 + ) => { 39 41 const opts = { 40 42 ..._config, 41 43 ...options, ··· 58 60 opts.body = opts.bodySerializer(opts.body); 59 61 } 60 62 61 - const url = buildUrl(opts); 63 + const url = buildUrl(opts as RequestOptions<unknown, boolean, string>); 62 64 63 65 return { opts, url }; 64 66 }; 65 67 66 68 // @ts-expect-error 67 69 const request: Client['request'] = async (options) => { 68 - // @ts-expect-error 69 70 const { opts, url } = await beforeRequest(options); 70 71 try { 71 72 // assign Axios here for consistency with fetch
+4 -3
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts
··· 35 35 return getConfig(); 36 36 }; 37 37 38 - const beforeRequest = async (options: RequestOptions) => { 38 + const beforeRequest = async <TData = unknown, Url extends string = string>( 39 + options: RequestOptions<TData, boolean, Url>, 40 + ) => { 39 41 const opts = { 40 42 ..._config, 41 43 ...options, ··· 58 60 opts.body = opts.bodySerializer(opts.body); 59 61 } 60 62 61 - const url = buildUrl(opts); 63 + const url = buildUrl(opts as RequestOptions<unknown, boolean, string>); 62 64 63 65 return { opts, url }; 64 66 }; 65 67 66 68 // @ts-expect-error 67 69 const request: Client['request'] = async (options) => { 68 - // @ts-expect-error 69 70 const { opts, url } = await beforeRequest(options); 70 71 try { 71 72 // assign Axios here for consistency with fetch
+4 -3
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts
··· 35 35 return getConfig(); 36 36 }; 37 37 38 - const beforeRequest = async (options: RequestOptions) => { 38 + const beforeRequest = async <TData = unknown, Url extends string = string>( 39 + options: RequestOptions<TData, boolean, Url>, 40 + ) => { 39 41 const opts = { 40 42 ..._config, 41 43 ...options, ··· 58 60 opts.body = opts.bodySerializer(opts.body); 59 61 } 60 62 61 - const url = buildUrl(opts); 63 + const url = buildUrl(opts as RequestOptions<unknown, boolean, string>); 62 64 63 65 return { opts, url }; 64 66 }; 65 67 66 68 // @ts-expect-error 67 69 const request: Client['request'] = async (options) => { 68 - // @ts-expect-error 69 70 const { opts, url } = await beforeRequest(options); 70 71 try { 71 72 // assign Axios here for consistency with fetch
+4 -3
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/client/client.gen.ts
··· 35 35 return getConfig(); 36 36 }; 37 37 38 - const beforeRequest = async (options: RequestOptions) => { 38 + const beforeRequest = async <TData = unknown, Url extends string = string>( 39 + options: RequestOptions<TData, boolean, Url>, 40 + ) => { 39 41 const opts = { 40 42 ..._config, 41 43 ...options, ··· 58 60 opts.body = opts.bodySerializer(opts.body); 59 61 } 60 62 61 - const url = buildUrl(opts); 63 + const url = buildUrl(opts as RequestOptions<unknown, boolean, string>); 62 64 63 65 return { opts, url }; 64 66 }; 65 67 66 68 // @ts-expect-error 67 69 const request: Client['request'] = async (options) => { 68 - // @ts-expect-error 69 70 const { opts, url } = await beforeRequest(options); 70 71 try { 71 72 // assign Axios here for consistency with fetch
+4 -3
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/client/client.gen.ts
··· 35 35 return getConfig(); 36 36 }; 37 37 38 - const beforeRequest = async (options: RequestOptions) => { 38 + const beforeRequest = async <TData = unknown, Url extends string = string>( 39 + options: RequestOptions<TData, boolean, Url>, 40 + ) => { 39 41 const opts = { 40 42 ..._config, 41 43 ...options, ··· 58 60 opts.body = opts.bodySerializer(opts.body); 59 61 } 60 62 61 - const url = buildUrl(opts); 63 + const url = buildUrl(opts as RequestOptions<unknown, boolean, string>); 62 64 63 65 return { opts, url }; 64 66 }; 65 67 66 68 // @ts-expect-error 67 69 const request: Client['request'] = async (options) => { 68 - // @ts-expect-error 69 70 const { opts, url } = await beforeRequest(options); 70 71 try { 71 72 // assign Axios here for consistency with fetch
+4 -3
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts
··· 35 35 return getConfig(); 36 36 }; 37 37 38 - const beforeRequest = async (options: RequestOptions) => { 38 + const beforeRequest = async <TData = unknown, Url extends string = string>( 39 + options: RequestOptions<TData, boolean, Url>, 40 + ) => { 39 41 const opts = { 40 42 ..._config, 41 43 ...options, ··· 58 60 opts.body = opts.bodySerializer(opts.body); 59 61 } 60 62 61 - const url = buildUrl(opts); 63 + const url = buildUrl(opts as RequestOptions<unknown, boolean, string>); 62 64 63 65 return { opts, url }; 64 66 }; 65 67 66 68 // @ts-expect-error 67 69 const request: Client['request'] = async (options) => { 68 - // @ts-expect-error 69 70 const { opts, url } = await beforeRequest(options); 70 71 try { 71 72 // assign Axios here for consistency with fetch
+4 -3
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/preact-query/axios/client/client.gen.ts
··· 35 35 return getConfig(); 36 36 }; 37 37 38 - const beforeRequest = async (options: RequestOptions) => { 38 + const beforeRequest = async <TData = unknown, Url extends string = string>( 39 + options: RequestOptions<TData, boolean, Url>, 40 + ) => { 39 41 const opts = { 40 42 ..._config, 41 43 ...options, ··· 58 60 opts.body = opts.bodySerializer(opts.body); 59 61 } 60 62 61 - const url = buildUrl(opts); 63 + const url = buildUrl(opts as RequestOptions<unknown, boolean, string>); 62 64 63 65 return { opts, url }; 64 66 }; 65 67 66 68 // @ts-expect-error 67 69 const request: Client['request'] = async (options) => { 68 - // @ts-expect-error 69 70 const { opts, url } = await beforeRequest(options); 70 71 try { 71 72 // assign Axios here for consistency with fetch
+4 -3
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/client/client.gen.ts
··· 35 35 return getConfig(); 36 36 }; 37 37 38 - const beforeRequest = async (options: RequestOptions) => { 38 + const beforeRequest = async <TData = unknown, Url extends string = string>( 39 + options: RequestOptions<TData, boolean, Url>, 40 + ) => { 39 41 const opts = { 40 42 ..._config, 41 43 ...options, ··· 58 60 opts.body = opts.bodySerializer(opts.body); 59 61 } 60 62 61 - const url = buildUrl(opts); 63 + const url = buildUrl(opts as RequestOptions<unknown, boolean, string>); 62 64 63 65 return { opts, url }; 64 66 }; 65 67 66 68 // @ts-expect-error 67 69 const request: Client['request'] = async (options) => { 68 - // @ts-expect-error 69 70 const { opts, url } = await beforeRequest(options); 70 71 try { 71 72 // assign Axios here for consistency with fetch
+4 -3
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts
··· 35 35 return getConfig(); 36 36 }; 37 37 38 - const beforeRequest = async (options: RequestOptions) => { 38 + const beforeRequest = async <TData = unknown, Url extends string = string>( 39 + options: RequestOptions<TData, boolean, Url>, 40 + ) => { 39 41 const opts = { 40 42 ..._config, 41 43 ...options, ··· 58 60 opts.body = opts.bodySerializer(opts.body); 59 61 } 60 62 61 - const url = buildUrl(opts); 63 + const url = buildUrl(opts as RequestOptions<unknown, boolean, string>); 62 64 63 65 return { opts, url }; 64 66 }; 65 67 66 68 // @ts-expect-error 67 69 const request: Client['request'] = async (options) => { 68 - // @ts-expect-error 69 70 const { opts, url } = await beforeRequest(options); 70 71 try { 71 72 // assign Axios here for consistency with fetch
+4 -3
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts
··· 35 35 return getConfig(); 36 36 }; 37 37 38 - const beforeRequest = async (options: RequestOptions) => { 38 + const beforeRequest = async <TData = unknown, Url extends string = string>( 39 + options: RequestOptions<TData, boolean, Url>, 40 + ) => { 39 41 const opts = { 40 42 ..._config, 41 43 ...options, ··· 58 60 opts.body = opts.bodySerializer(opts.body); 59 61 } 60 62 61 - const url = buildUrl(opts); 63 + const url = buildUrl(opts as RequestOptions<unknown, boolean, string>); 62 64 63 65 return { opts, url }; 64 66 }; 65 67 66 68 // @ts-expect-error 67 69 const request: Client['request'] = async (options) => { 68 - // @ts-expect-error 69 70 const { opts, url } = await beforeRequest(options); 70 71 try { 71 72 // assign Axios here for consistency with fetch
+4 -3
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts
··· 35 35 return getConfig(); 36 36 }; 37 37 38 - const beforeRequest = async (options: RequestOptions) => { 38 + const beforeRequest = async <TData = unknown, Url extends string = string>( 39 + options: RequestOptions<TData, boolean, Url>, 40 + ) => { 39 41 const opts = { 40 42 ..._config, 41 43 ...options, ··· 58 60 opts.body = opts.bodySerializer(opts.body); 59 61 } 60 62 61 - const url = buildUrl(opts); 63 + const url = buildUrl(opts as RequestOptions<unknown, boolean, string>); 62 64 63 65 return { opts, url }; 64 66 }; 65 67 66 68 // @ts-expect-error 67 69 const request: Client['request'] = async (options) => { 68 - // @ts-expect-error 69 70 const { opts, url } = await beforeRequest(options); 70 71 try { 71 72 // assign Axios here for consistency with fetch
+4 -3
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/client/client.gen.ts
··· 35 35 return getConfig(); 36 36 }; 37 37 38 - const beforeRequest = async (options: RequestOptions) => { 38 + const beforeRequest = async <TData = unknown, Url extends string = string>( 39 + options: RequestOptions<TData, boolean, Url>, 40 + ) => { 39 41 const opts = { 40 42 ..._config, 41 43 ...options, ··· 58 60 opts.body = opts.bodySerializer(opts.body); 59 61 } 60 62 61 - const url = buildUrl(opts); 63 + const url = buildUrl(opts as RequestOptions<unknown, boolean, string>); 62 64 63 65 return { opts, url }; 64 66 }; 65 67 66 68 // @ts-expect-error 67 69 const request: Client['request'] = async (options) => { 68 - // @ts-expect-error 69 70 const { opts, url } = await beforeRequest(options); 70 71 try { 71 72 // assign Axios here for consistency with fetch