SAP Spartacus里的StorefrontConfig静态类型
生活随笔
收集整理的這篇文章主要介紹了
SAP Spartacus里的StorefrontConfig静态类型
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
當我把下圖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 Spartacus里的StorefrontConfig静态类型的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 2021年什么时候立冬 每年立冬时间是一
- 下一篇: 能否直接在Visual Studio C