Created
December 18, 2023 06:11
-
-
Save wmakeev/2d5a1badb41da25af9261fdf6a023ceb to your computer and use it in GitHub Desktop.
Node global typing #node #typescript #global
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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