SAP Spartacus里的StorefrontConfig静态类型
2023-09-14 09:02:55 时间
当我把下图Spartacus这段配置代码里的baseUrl改成baseUrl2时,
报错:
Follow link (ctrl + click)
Types of property 'backend' are incompatible.
Type '{ occ: { baseUrl2: string; prefix: string; }; }' is not assignable to type '{ occ?: { baseUrl?: string; prefix?: string; useWithCredentials?: boolean; endpoints?: OccEndpoints; legacy?: boolean; }; media?: { baseUrl?: string; }; loadingScopes?: LoadingScopes; }'.
Types of property 'occ' are incompatible.
Type '{ baseUrl2: string; prefix: string; }' is not assignable to type '{ baseUrl?: string; prefix?: string; useWithCredentials?: boolean; endpoints?: OccEndpoints; legacy?: boolean; }'.
Object literal may only specify known properties, but 'baseUrl2' does not exist in type '{ baseUrl?: string; prefix?: string; useWithCredentials?: boolean; endpoints?: OccEndpoints; legacy?: boolean; }'. Did you mean to write 'baseUrl'?ts(2326)
Peek Problem
No quick fixes available
这个config的类型为StorefrontConfig:
其定义在这个文件里:“C:\Code\SPA\mystore\node_modules@spartacus\storefront\storefront-config.d.ts”
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
相关文章
- SAP UI5 sap.ui.layout.Grid 控件概述
- 给 SAP Commerce Cloud Storefront 设置 endpoint
- SAP UI5 应用中的 sap.ui.require.toUrl 使用场景
- 关于 SAP UI5 所有控件的共同祖先 - sap.ui.base.ManagedObject
- SAP Commerce Cloud 的 Security 策略概述
- 如何将SAP归档数据合并到数据湖中
- SAP UI5 本地开发如何实现 XML 和 JavaScript 代码的自动完成和嵌入式 API 文档自动显示试读版
- sap.ui.core.Configuration 的作用简析
- SAP ABAP 通过 https 消费外部 API 遇到错误消息 SSSLERR_SSL_CONNECT
- SAP系统内如何查询特定时间内某个Tcode都修改了什么-AUT10详解编程语言
- SAP 获取用户IP、操作记录详解编程语言
- SAP 采购订单抬头屏幕增强详解编程语言
- SAP GUI FOR HTML登陆详解编程语言
- SAP中用json数据格式调用http接口发送短信邮件案例详解编程语言
- SAP在Linux上安装(sap安装linux)
- SAP vs Oracle:差异点与解析(sap和oracle的区别)
- 比较:Oracle与SAP的对比(oracle和sap)
- 缓存使用SAP创建Redis缓存,实现高效稳定加速(sap如何创建redis)
- Oracle与SAP金蝶谁更具竞争力(oracle sap金蝶)
- Oracle与SAP的技术潜力比较(oracle sap比较)
- 探索 Oracle 与 SAP 技术的开发可能性(oracle sap开发)