Commit f9878c8
authored
chore: Prepare to use TypeScript natively (#2910)
### Description
This PR is a starting point of upgrading to TypeScript and preparing for
future upgrades around testing and maintenance.
I've seen that couple of types between the `*.js` files and the
`index.d.ts` were not 100% in sync, which is one of the reasons the move
to TypeScript natively could help here.
### What's new / changed
- moved `js` to `lib` in order to keep `js` as the same output folder
which is delivered to NPM
- `js/index.d.ts` stays as type export for NPM and the types are
re-exported via the jsdoc `@typedef`
- `types.ts` is actually the same as the previous `index.d.ts` excluding
the `SentryCli` class
- TypeScript is partially used to keep the changes minimal
- I aligned the jsdoc types with the actual text from the previous
`index.d.ts`1 parent 8270534 commit f9878c8
File tree
21 files changed
+340
-295
lines changed- .cursor/rules
- .github
- workflows
- js
- lib
- __mocks__
- __tests__
- releases
- __tests__
- options
21 files changed
+340
-295
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | | - | |
| 38 | + | |
40 | 39 | | |
41 | 40 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
231 | 234 | | |
232 | 235 | | |
233 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
40 | 62 | | |
| 63 | + | |
41 | 64 | | |
42 | 65 | | |
43 | 66 | | |
| |||
56 | 79 | | |
57 | 80 | | |
58 | 81 | | |
59 | | - | |
| 82 | + | |
60 | 83 | | |
61 | 84 | | |
62 | 85 | | |
| |||
65 | 88 | | |
66 | 89 | | |
67 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
68 | 100 | | |
69 | 101 | | |
70 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| |||
This file was deleted.
File renamed without changes.
File renamed without changes.
0 commit comments