TypeScript generator: null variants 9bc6b4720fc1
- Author
- Andy McCall @andymccall <[email protected]>
- When
- · 2026-09-27 19:38 UTC
- Signature
- ✔ signed by Andy McCall
- Hash
9bc6b4720fc12185874a9710b310ddb36d2625cd86d653d23783b960915ef19d
- Depends on
- 81a6254b92af b64e2537d702
- Depended on by
- nothing yet
- In bookmarks
- api-unknown-fields cancel-landed-runs clear-waiting close-proposal-140 diffusion-pin-bookmark draft-ready image-check job-waits main oh-comment-body-file proposal-list-fast run-one-job wiki-says-so
- In tags
- v0.1.0 v0.2.0 v0.3.0 v0.3.1 v0.4.0 v0.4.1 v0.4.2 v0.5.0 v0.5.1 v0.5.2 v0.6.0 v0.6.1 v0.7.0 v0.8.0 v0.9.0 v0.9.1 v0.9.11 v0.9.15 v0.9.16 v0.9.19 v0.9.2 v0.9.20 v0.9.21 v0.9.22 v0.9.23 v0.9.24 v0.9.3 v0.9.4 v0.9.5 v0.9.6 v0.9.7 v0.9.8 v0.9.9
- Edits
- 6 atoms, 0 tree operations, 2 files
Browse the tree at this change
modified
crates/hub-api/src/bin/typescript.rs
+1 −0
|
|
… |
33 unchanged lines |
| 34 |
34 |
|
"string" => "string".to_string(), |
| 35 |
35 |
|
"integer" | "number" => "number".to_string(), |
| 36 |
36 |
|
"boolean" => "boolean".to_string(), |
|
37 |
+ |
"null" => "null".to_string(), |
| 37 |
38 |
|
"array" => format!("{}[]", schema.get("items").map(ts_type).unwrap_or_else(|| "unknown".into())), |
| 38 |
39 |
|
"object" => { |
| 39 |
40 |
|
let props = schema.get("properties").and_then(Value::as_object); |
|
|
… |
39 unchanged lines |
modified
crates/hub-api/ts/index.d.ts
+4 −4
|
|
… |
145 unchanged lines |
| 146 |
146 |
|
}; |
| 147 |
147 |
|
|
| 148 |
148 |
|
export type Comment = { |
| 149 |
|
- |
anchor?: Atom | unknown; |
|
149 |
+ |
anchor?: Atom | null; |
| 150 |
150 |
|
author: string; |
| 151 |
151 |
|
body: string; |
| 152 |
152 |
|
created_ms: number; |
|
|
… |
92 unchanged lines |
| 245 |
245 |
|
export type Trust = { |
| 246 |
246 |
|
hub_key: string; |
| 247 |
247 |
|
invalid: string[]; |
| 248 |
|
- |
policy?: Policy | unknown; |
|
248 |
+ |
policy?: Policy | null; |
| 249 |
249 |
|
sealed: number; |
| 250 |
250 |
|
signed: number; |
| 251 |
251 |
|
unsigned: number; |
|
|
… |
91 unchanged lines |
| 343 |
343 |
|
data: unknown; |
| 344 |
344 |
|
delivery: string; |
| 345 |
345 |
|
event: string; |
| 346 |
|
- |
repository?: Repository | unknown; |
|
346 |
+ |
repository?: Repository | null; |
| 347 |
347 |
|
}; |
| 348 |
348 |
|
|
| 349 |
349 |
|
export type ProposalEvent = { |
| 350 |
|
- |
check?: Check | unknown; |
|
350 |
+ |
check?: Check | null; |
| 351 |
351 |
|
kind: string; |
| 352 |
352 |
|
number: number; |
| 353 |
353 |
|
}; |
|
|
… |
1 unchanged lines |