@tsonic/nodejs 0.4.4 → 0.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,13 +6,13 @@ TypeScript type definitions for the Node.js CLR library.
6
6
 
7
7
  - **Node.js-like APIs for .NET** - fs, path, events, http, and more
8
8
  - **camelCase members** - TypeScript-friendly naming conventions
9
- - **Branded primitive types** - Typed numbers via `@tsonic/types`
9
+ - **Primitive aliases** - `int`, `long`, `decimal`, etc. via `@tsonic/core`
10
10
  - **Full type safety** - Complete TypeScript declarations
11
11
 
12
12
  ## Installation
13
13
 
14
14
  ```bash
15
- npm install @tsonic/nodejs @tsonic/types
15
+ npm install @tsonic/nodejs @tsonic/dotnet @tsonic/core
16
16
  ```
17
17
 
18
18
  ## Usage
@@ -20,7 +20,7 @@ npm install @tsonic/nodejs @tsonic/types
20
20
  ### File System
21
21
 
22
22
  ```typescript
23
- import type { fs } from "@tsonic/nodejs/nodejs";
23
+ import { fs } from "@tsonic/nodejs/index.js";
24
24
 
25
25
  // Read file
26
26
  const content = fs.readFileSync("./package.json", "utf-8");
@@ -32,9 +32,9 @@ fs.writeFileSync("./output.txt", "Hello from Tsonic!");
32
32
  ### Path Operations
33
33
 
34
34
  ```typescript
35
- import type { path } from "@tsonic/nodejs/nodejs";
35
+ import { path } from "@tsonic/nodejs/index.js";
36
36
 
37
- const fullPath = path.join(__dirname, "config", "settings.json");
37
+ const fullPath = path.join("config", "settings.json");
38
38
  const ext = path.extname(fullPath); // ".json"
39
39
  const dir = path.dirname(fullPath);
40
40
  ```
@@ -42,7 +42,7 @@ const dir = path.dirname(fullPath);
42
42
  ### Events
43
43
 
44
44
  ```typescript
45
- import type { EventEmitter } from "@tsonic/nodejs/nodejs";
45
+ import { EventEmitter } from "@tsonic/nodejs/index.js";
46
46
 
47
47
  class MyEmitter extends EventEmitter {}
48
48
  const emitter = new MyEmitter();
@@ -52,7 +52,7 @@ emitter.on("data", (chunk) => console.log(chunk));
52
52
  ### HTTP
53
53
 
54
54
  ```typescript
55
- import type { HttpServer, HttpRequest, HttpResponse } from "@tsonic/nodejs/nodejs.Http";
55
+ import { http } from "@tsonic/nodejs/nodejs.Http.js";
56
56
  ```
57
57
 
58
58
  ## Naming Conventions
@@ -60,7 +60,7 @@ import type { HttpServer, HttpRequest, HttpResponse } from "@tsonic/nodejs/nodej
60
60
  - **Types**: PascalCase (matches .NET)
61
61
  - **Members**: camelCase (TypeScript convention)
62
62
 
63
- For CLR/PascalCase naming, use `@tsonic/nodejs-pure` instead.
63
+ To generate CLR/PascalCase member names, regenerate with `--naming clr` (or omit `--naming js`).
64
64
 
65
65
  ## Development
66
66