|
|
@@ -204,9 +204,13 @@ However, this sacrifices type safety. To make our custom fields type-safe we can
|
|
|
|
|
|
```TypeScript
|
|
|
// types.ts
|
|
|
-import { CustomProductFields } from '@vendure/core';
|
|
|
|
|
|
-declare module '@vendure/core' {
|
|
|
+// Note: we are using deep a import here, rather than importing from `@vendure/core` due to
|
|
|
+// a possible bug in TypeScript (https://github.com/microsoft/TypeScript/issues/46617) which
|
|
|
+// causes issues when multiple plugins extend the same custom fields interface.
|
|
|
+import { CustomProductFields } from '@vendure/core/dist/entity/custom-entity-fields';
|
|
|
+
|
|
|
+declare module '@vendure/core/dist/entity/custom-entity-fields' {
|
|
|
interface CustomProductFields {
|
|
|
infoUrl: string;
|
|
|
downloadable: boolean;
|