Commit 610dada
authored
[Doc] Switch npmjs README examples to ESM (#1542)
Align the npm-published README (scripts/npmjs-readme.md) with the package's ESM-first API.
- Quick-start snippet: replace the CommonJS `require()` + `init().then()` form with native ESM `import rclnodejs from 'rclnodejs'` and top-level `await rclnodejs.init()`.
- TypeScript guidance: update the sample tsconfig from `commonjs` / `node` / `es2020` to `NodeNext` / `NodeNext` / `es2022` to match ESM module resolution.
Fix: #15411 parent 3c5df58 commit 610dada
1 file changed
Lines changed: 10 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
92 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
0 commit comments