Typescript error when `postData` is missing
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 48/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 停滯
- 技術堆疊
- typescript
研究方向
從錯誤中參照的 TypeScript 宣告 httpsnippet.d.ts 開始,將其 HarRequest 定義與不帶 postData 建構 HTTPSnippet 的範例進行比較。透過編譯所示範例並確認缺少 postData 的錯誤已消失,驗證修正後的型別定義。
由索引模型根據 Issue 內容生成。
描述
From the example:
const snippet = new HTTPSnippet({
method: 'GET',
url: 'http://mockbin.com/request',
});
const options = { indent: '\t' };
const output = snippet.convert('shell', 'curl', options);
console.log(output);
I get a typescript error
Argument of type '{ method: string; url: string; }' is not assignable to parameter of type 'HarRequest | HarEntry'.
Type '{ method: string; url: string; }' is not assignable to type 'HarRequest'.
Property 'postData' is missing in type '{ method: string; url: string; }' but required in type '{ postData: any; }'.ts(2345)
httpsnippet.d.ts(19, 5): 'postData' is declared here.
- 主要語言
- TypeScript
- 星號
- 1.2k
- 分支
- 241
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
Kong/httpsnippet 的其他 Issue
-
難度 1/5 1 小時以內 新手友好度 62/100
Kong/httpsnippet#356 ·
-
難度 3/5 1-2 天 新手友好度 35/100
Kong/httpsnippet#389 ·
-
難度 5/5 一週以上 新手友好度 25/100
Kong/httpsnippet#383 ·
-
Bug: R Code Generation Does Not Quote Parameters with Special Characters (e.g., `codes[]`)可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 3/5 1-2 天 新手友好度 35/100
Kong/httpsnippet#379 ·
-
難度 3/5 1-2 天 新手友好度 48/100
Kong/httpsnippet#370 ·
相似的 Issue
-
perf(core): getComments() runs the approved count and the comment list as two sequential queries未關閉area/core bot:bug bot:working
難度 2/5 1-3 小時 新手友好度 76/100
emdash-cms/emdash#3905 · 2 則留言 ·
維護者通常 1 天內回覆
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難度 1/5 1 小時以內 新手友好度 90/100
lingdojo/kana-dojo#31728 · 1 則留言 · 5 個 reaction ·
維護者通常 1 天內回覆
-
selective-claw: freshTailTurns=0 keeps ALL turns verbatim and summarizes none (slice(-0) === slice(0))可能已有人在做 @zjncs 今天認領。 未關閉component:tokenless
難度 2/5 1-3 小時 新手友好度 80/100
agentic-os-org/ANOLISA#6112 · 1 則留言 ·
維護者通常 1 天內回覆
-
bug needs triage
難度 2/5 1-3 小時 新手友好度 75/100
rjsf-team/react-jsonschema-form#5439 ·
維護者通常 1 天內回覆
-
enhancement
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆