Commit 0169b9e
committed
fix(types): flip residual
Cleanup of null→undefined autofix fallout (task #52 / related). The
autofix changed assignment sites (`return null` → `return undefined`,
`= null` → `= undefined`) but didn't update the type unions, leaving 17
TS2322 errors where `undefined` was assigned to a `T | null` slot.
Fixes:
* src/auth.ts: getOrganizations() return type → Promise<X | undefined>
* src/data/editor-config.ts: onDidChangeConfigurationDisposable union
* src/data/go/mod-parser.ts: parseGoMod() return type
* src/data/go/wasm-executor.ts: _pendingEvent union; fsync callback
uses the (null, undefined) Node-style "no error, void result"
pattern (the null IS the API contract here — inline rule disable).
* src/ui/decorations.ts: packageData union
* src/ui/externals/parse-externals.ts: parseExternals() return type
* src/ui/purl-alerts-and-scores/manager.ts: pkgData/error unions
No behavior change — only type-side adjustments to match the assignment
shape the autofix already chose. tsgo check now passes (0 errors).T | null declarations to T | undefined
1 parent 57d39b0 commit 0169b9e
7 files changed
Lines changed: 13 additions & 9 deletions
File tree
- src
- data
- go
- ui
- externals
- purl-alerts-and-scores
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
323 | | - | |
| 323 | + | |
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
| 217 | + | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
0 commit comments