@aptre/common 0.36.0 → 0.36.1
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 +19 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -289,6 +289,25 @@ run `aptre deps` first.
|
|
|
289
289
|
`tests/rust-graph/check.bash` generates a project with every kind of type path,
|
|
290
290
|
checks it, and runs the Rust tests over exactly that output.
|
|
291
291
|
|
|
292
|
+
### `aptre.tsTypedDecode`
|
|
293
|
+
|
|
294
|
+
`tsTypedDecode` makes `protoc-gen-es-lite` generate a typed decoder for every
|
|
295
|
+
message, a `switch` on the field number that reads straight into the message,
|
|
296
|
+
in place of the shared field walker:
|
|
297
|
+
|
|
298
|
+
```json
|
|
299
|
+
{
|
|
300
|
+
"aptre": {
|
|
301
|
+
"tsTypedDecode": true
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
Turn it on for code that runs in a JavaScript interpreter such as QuickJS or
|
|
307
|
+
that an ahead-of-time compiler builds, where the typed decoder is faster. It
|
|
308
|
+
makes the generated files larger, and under a JIT the walker is as fast, so it
|
|
309
|
+
is off by default.
|
|
310
|
+
|
|
292
311
|
### `aptre.tsImportBoundaries`
|
|
293
312
|
|
|
294
313
|
`tsImportBoundaries` configures how generated TypeScript protobuf imports are
|