File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -2,24 +2,26 @@ import type { Module } from '@vue-storefront/sdk';
2
2
import { connector } from './connector' ;
3
3
import { ModuleOptions } from './types' ;
4
4
5
+ /**
6
+ * @deprecated This type is deprecated and will be removed in the next major version.
7
+ * It is no longer necessary to use this type. Please, check documentation of `magentoModule`.
8
+ */
5
9
export interface MagentoModuleType extends Module {
6
10
connector : ReturnType < typeof connector > ;
7
11
}
8
12
9
13
/**
10
14
* Magento module.
11
15
*
12
- * @example
13
- *
14
- * Initialization of the Magento module.
16
+ * @example Initialization of the Magento module.
15
17
*
16
18
* ```js
17
19
* import { initSDK, buildModule } from '@vue-storefront/sdk';
18
20
* import { magentoModule, MagentoModuleType } from '@vue-storefront/magento2-sdk'
19
21
*
20
22
* const sdkConfig = {
21
23
* magento:
22
- * buildModule<MagentoModuleType> (
24
+ * buildModule(
23
25
* magentoModule,
24
26
* {
25
27
* apiUrl: 'http://localhost:8181/magento',
@@ -30,7 +32,7 @@ export interface MagentoModuleType extends Module {
30
32
* export const sdk = initSDK<typeof sdkConfig>(sdkConfig);
31
33
* ```
32
34
*/
33
- export const magentoModule = ( options : ModuleOptions ) : MagentoModuleType => {
35
+ export const magentoModule = ( options : ModuleOptions ) => {
34
36
return {
35
37
connector : connector ( options ) ,
36
38
} ;
Original file line number Diff line number Diff line change @@ -10,5 +10,5 @@ export interface ModuleOptions {
10
10
/**
11
11
* The SSR API URL of the Magento instance
12
12
*/
13
- ssrApiUrl : string ;
13
+ ssrApiUrl ? : string ;
14
14
}
You can’t perform that action at this time.
0 commit comments