Description
The @hey-api/sdk plugin generates a meta field on Options hardcoded to
Record<string, unknown>, which can be used as a side-channel for data to
interceptors/middleware. However this value is in effect untyped which can lead to
bugs:
await getFoo({ meta: { retryy: false } }); // typo'd key — compiles
await getFoo({ meta: { timeout: '30s' } }); // wrong type — compiles
This issue has been previously reported here: #2425 (comment)
I have a PR with a proposed solution here: #3996
Description
The
@hey-api/sdkplugin generates ametafield onOptionshardcoded toRecord<string, unknown>, which can be used as a side-channel for data tointerceptors/middleware. However this value is in effect untyped which can lead to
bugs:
This issue has been previously reported here: #2425 (comment)
I have a PR with a proposed solution here: #3996