Skip to content

Instantly share code, notes, and snippets.

@wmakeev
Created December 18, 2023 06:11
Show Gist options
  • Save wmakeev/2d5a1badb41da25af9261fdf6a023ceb to your computer and use it in GitHub Desktop.
Save wmakeev/2d5a1badb41da25af9261fdf6a023ceb to your computer and use it in GitHub Desktop.
Node global typing #node #typescript #global
declare module NodeJS {
interface Global {
// TODO Использовать Symbol?
appConfig: {
/**
* Продукты которые необходимо добавить в заказ
*/
appedingProducts: Array<{
/** Ссылка на товар в API */
ref: `entity/${string}/${string}`
/** По умолчанию - `1` */
quantity?: number
/** По умаолчанию первая цена продажи из карточки товара */
price?: number
/** По умолчанию `true` */
reserve?: boolean
}>
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment