Browse Source

docs: Added hint for multiple custom states

Co-authored-by: Kevin Mattutat <kevin.mattutat@spaceparrots.de>
Drayke 4 years ago
parent
commit
219f46e9af

+ 7 - 0
docs/content/docs/developer-guide/customizing-the-order-process/index.md

@@ -69,6 +69,13 @@ export const config: VendureConfig = {
 };
 ```
 
+ To add multiple new States you need to extend the generic type like this:
+ ```TypeScript
+import { CustomOrderProcess } from '@vendure/core';
+
+export const customerValidationProcess: CustomOrderProcess<'ValidatingCustomer'|'AnotherState'> = {...}
+ ```
+This way multiple custom states gets defined.
 
 ### Example: Intercepting a state transition