SAP Spartacus里的StorefrontConfig静态类型
生活随笔
收集整理的這篇文章主要介紹了
SAP Spartacus里的StorefrontConfig静态类型
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
當(dāng)我把下圖Spartacus這段配置代碼里的baseUrl改成baseUrl2時(shí),
報(bào)錯(cuò):
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這個(gè)config的類型為StorefrontConfig:
其定義在這個(gè)文件里:“C:\Code\SPA\mystore\node_modules@spartacus\storefront\storefront-config.d.ts”
要獲取更多Jerry的原創(chuàng)文章,請(qǐng)關(guān)注公眾號(hào)"汪子熙":
總結(jié)
以上是生活随笔為你收集整理的SAP Spartacus里的StorefrontConfig静态类型的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 2021年什么时候立冬 每年立冬时间是一
- 下一篇: 能否直接在Visual Studio C