Wildberries API TypeScript SDK / warnOnce
Function: warnOnce()
ts
function warnOnce(methodKey: string, message: string): void;Defined in: utils/deprecation.ts:28
Emit a deprecation warning for a method, at most once per process.
Parameters
| Parameter | Type | Description |
|---|---|---|
methodKey | string | Unique identifier for the deprecated method (e.g. 'products.getCardsList:legacy-withphoto-zero') |
message | string | The warning message to display |
Returns
void
Example
typescript
warnOnce(
'products.getCardsList:legacy-withphoto-zero',
'[DEPRECATED] withPhoto: 0 semantics changed. Use WITH_PHOTO_FILTER.NO_PHOTO for "no photo only".'
);