Skip to content

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

ParameterTypeDescription
methodKeystringUnique identifier for the deprecated method (e.g. 'FinancesModule.getSupplierReportDetailByPeriod')
messagestringThe warning message to display

Returns

void

Example

typescript
warnOnce(
  'FinancesModule.getSupplierReportDetailByPeriod',
  '[DEPRECATED] getSupplierReportDetailByPeriod() is deprecated. Migrate to getSalesReportsDetailed().'
);

Made with ❤️ for the Wildberries developer community