
[英]Extract the array out of the string
如何從字符串中提取數組? 當前的:"['Biller.Customer.Data@Taxonomy', 'Product.Platform and Enterprise Services Data.Data@Taxonomy']" 預期的:['Biller.Customer.Data@Taxono ...
[英]Extract the array out of the string
如何從字符串中提取數組? 當前的:"['Biller.Customer.Data@Taxonomy', 'Product.Platform and Enterprise Services Data.Data@Taxonomy']" 預期的:['Biller.Customer.Data@Taxono ...
[英]Can't search data in prisma schema using aonther shcema in nestjs
編輯: 使用 where: { id: userId } don't help ,因為它使用書簽的 id 而不是添加書簽的用戶進行搜索我的目標是能夠使用來自另一個 model 的 userId 在書簽表中進行搜索。 在這個使用 Prisma 的 model 文件中,我有兩個模型(一個用於用戶,一個用 ...
[英]How to merge multiple generic TypeScript lists into a new list with a union type?
我正在嘗試創建一個 TypeScript 方法,它將任意數量的通用列表合並到一個新列表中,其中新列表的類型是原始列表中項目類型的並集。 我有一個列表 class 如下: 我想向 List 添加一個 static 合並方法,它接受任意數量的 List 對象並將它們的項目合並到一個新的 List ob ...
[英]DynamoDB throwing undefined values error despite being able to write to DB using different array to PUT to DB
我有一個方法調用具有以下架構的表:userId: string | sessionId: 字符串 | orders: list 下面是代碼: 在修改 studentOrders 數組以將新的學生訂單推入其中時,在嘗試將更改放入 DynamoDb 到 OrderBook 表中后,我總是收到以下錯誤 ...
[英]TypeScript + Playwright/Puppeteer Pass class as argument in evaluate
賞金將在 5 天后到期。 此問題的答案有資格獲得+50聲望賞金。 crazones110想引起更多人對這個問題的關注。 我遇到了編碼測試自動化的問題,劇作家試圖將 class 作為參數傳遞給evaluate 。 下面是最小的可重現示例。 文件夾結構 工具.tsexport class Utils ...
[英]getServerSideProps props are undefined on client-side when using middleware
賞金將在 6 天后到期。 此問題的答案有資格獲得+50聲望賞金。 kennsorr想讓更多人關注這個問題。 如果使用 Nextjs 中間件滿足特定條件,我將嘗試在每個頁面上進行重定向。 出於某種原因,每當 middleware.ts 中的matcher匹配頁面時,該頁面上getServerSid ...
[英]Building a Type from an object with properties of type Boolean?
我想從這個 object 構造一個類型:const isSynchronized: Record<SynchronizableField, boolean> = { /* synchronized */ surveyMacroEnvironments: true, ...
[英]Import React Components from one app into another TS React App
我最近做了兩個應用程序,一個應該是一個內部具有復雜邏輯的組件庫,例如,一個組件應該渲染一個視圖,內部有兩個或三個組件,每個組件都有 useRefs、useStates 等等。 但是,當我嘗試構建這些組件並通過 TSC / rollup 將它們導出到我的其他應用程序時,在導入它們時出現此錯誤: 如果 ...
[英]TypeScript is unable to infer type properly from a typed string variable
我正在嘗試使用“自由”創建的string作為 object 的鍵。 這會突出顯示帶有消息的.selected 類型“boolean”上不存在屬性“selected”。 這是一個游樂場。 是否有解決方法,或者這根本不可能? ...
[英]vue event on sfc html element dissapears
賞金將在 6 天后到期。 此問題的答案有資格獲得+50聲望賞金。 Sander_P想提請更多人關注這個問題。 我正在使用 Electron Forge 和Webpack + Typescript 模板項目開發 ElectronJs 項目我還為 webpack 安裝了 Vue 和 vue-load ...
[英]Testing Luxon Datetime with React Testing Library results in error if calling Luxon functions
我找不到這個問題的答案所以如果重復請刪除。 我有使用 React Hook 形式 (7.22.5) 和 Luxon (2.3.1) 的 React (17.0.26) 組件。 這是組件定義本身是這樣的(無法提供完整的組件代碼): 當我嘗試使用 React 測試庫運行測試以僅測試組件時,出現以下錯誤: ...
[英]Can't blur ComboboxInput from Headless UI in Vue3, Composition API
我正在嘗試通過 ref 訪問<ComboboxInput/>並以編程方式模糊輸入元素。 我得到的錯誤是 blur 是未定義的,但是當我 console.log 引用本身時,它看起來像是對 HTMLInputElement 的實際引用。 這是組合框輸入: 這是參考: 有誰知道如何解決這個 ...
[英]Next Auth useSession does not get session at first render
我正在嘗試使用 NextJS v13 和 Next Auth v4 構建網站。 每當加載頁面/組件時,在使用useSession掛鈎時,第一次渲染時不會返回 session,因此,許多組件無法正常工作...... 例如,以下代碼應為經過身份驗證的用戶加載問題:'use client' import ...
[英]ngx-virtual-scroll is not working after angular16 updation
ngx-virtual-scroll 在 angular16 更新后不工作,在終端中顯示一個錯誤。 錯誤是 我該如何解決這個問題? ...
[英]How to force typescript to ignore node_modules in Next 13
我將在接下來的 13 年建立一個網站,其中包含 typescript、src 文件夾和應用程序目錄。 當我npm run dev時,一切都按預期工作,但是一旦構建,我就會收到此錯誤... 這讓我相信這是構建過程/打字稿試圖處理 node_modules 目錄。 tsconfig.json pa ...
[英]Compare equality of two Uint8Array
賞金將在 6 天后到期。 此問題的答案有資格獲得+50聲望賞金。 Brad正在尋找此問題的最新答案。 我正在使用 CRC32 比較兩個Uint8Array以確保解壓縮數據的准確性。 但是,我面臨的問題是沒有像Uint8Array.equal()這樣的 API 來比較 arrays。盡管 Node ...
[英]How do you update a yarn workspace monorepo to node 18 with yarn typescript and jest?
今年(2023 年)對 Node 14 和 16 的支持結束。 所以我們選擇遷移到18。這個遷移問題是從運行節點14的yarn 2 workspace monorepo到運行節點18的yarn 3 workspace monorepo。 我們遇到的第一個問題是: ...
[英]Next.js app folder: is there some "entry point"? A direct replacement for _app.tsx?
以前我有一個自定義的_app.tsx為我的應用程序做了一些引導: useEffect(() => void defineCustomElements(), []); 它加載自定義元素/網絡組件並確保它們可以被水化。 我現在應該把這個效果放在應用程序路由器的什么地方,1. 沒有“全局” _ap ...
[英]I am trying to setup of a webhook using Stripe and NextJS 13.2.3
我能夠通過內置的 Stripe 頁面成功結帳我的購物車,並且我被重定向到我的 successUrl 路由。 我的本地測試 webhook 按預期被調用。 但是,當我包含驗證請求來自 Stripe 的代碼時,出現了一些錯誤。 這是我在 NextJS 中的 webhook 我正在使用 Stripe C ...
[英]Typescript TypeError with es2022 but not with es2021
我正在嘗試將 tsconfig.json 文件的目標屬性從 es2015 更新到 es2022。 但是我在運行測試時遇到錯誤,我認為只使用 tsc 而不使用 babel: Chrome Headless 110.0.5481.177 (Mac OS 10.15.7) 類型錯誤:無法讀取未定義的屬性 ...