You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -215,6 +215,8 @@ import * as protobuf from "protobufjs";
215
215
...
216
216
```
217
217
218
+
See also: [Generating your own TypeScript definitions](https://github.com/dcodeIO/protobuf.js#generating-typescript-definitions-from-static-modules)
219
+
218
220
Module Structure
219
221
----------------
220
222
The library exports a flat `protobuf` namespace including but not restricted to the following members, ordered by category:
@@ -352,7 +354,7 @@ Likewise, the `pbts` command line utility can be used to generate TypeScript def
352
354
```
353
355
Generates TypeScript definitions from annotated JavaScript files.
354
356
355
-
-n, --name Specifies the module name.
357
+
-n, --name Wraps everything in a module of the specified name.
356
358
357
359
-o, --out Saves to a file instead of writing to stdout.
While .proto and JSON files require the full library (about 18kb gzipped, all features including reflection, parser and utility), pretty much all code but the relatively short descriptors is shared.
366
+
While .proto and JSON files require the full library (about 18kb gzipped), pretty much all code but the relatively short descriptors is shared and all features including reflection and the parser are available.
365
367
366
-
Static code, on the other hand, requires just the minimal runtime (about 5.5kb gzipped, i.e. no reflection features), but generates additional, albeit editable and customizable, source code.
368
+
Static code, on the other hand, requires just the minimal runtime (about 5.5kb gzipped), but generates additional, albeit editable, source code without any reflection features.
367
369
368
-
When `new Function(...)` is supported (and it usually is), there is no difference performance-wise as the code generated statically is the same as generated at runtime.
370
+
When `new Function(...)` is supported (and it usually is), there is no difference performance-wise as the code generated statically is pretty much the same as generated at runtime.
0 commit comments