Timo Stamm

Results 302 comments of Timo Stamm

I'm happy to. The following function creates import paths: https://github.com/timostamm/protobuf-ts/blob/fbce12b7259cacea5d45ebf3503c8ac8a0200c73/packages/plugin-framework/src/typescript-imports.ts#L285-L288 The function is local to the `typescript-imports.ts` module (of the package `@protobuf-ts/plugin-framework`), and exports the class `TypeScriptImports`. The only place...

There is also the deprecated `packages/plugin-framework/src/typescript-import-manager.ts`, which can be ignored - it is not used anymore. There is a spec file for parts of `typescript-imports.ts`. It is probably best to...

`const HelloWorldService: any` sure looks odd, Alec. I would have expected a `const HelloWorldService: ServiceType`. Can you verify that this happens with other JavaScript targets as well?

Thank you for verifying. I think the best fix is to add an explicit typing to the variable declaration here: https://github.com/timostamm/protobuf-ts/blob/02c82bdc66e1cf2bea199906c580e9d75ff93bcf/packages/plugin/src/code-gen/service-type-generator.ts#L56 Using `ts.createTypeReferenceNode`. See https://ts-ast-viewer.com/#code/MYewdgzgLgBAZiEAuGAhAhgJxgXhgRgCYBmIA I don't have time to...

Hi Tim, we can't import TextEncoder from 'util' because 'util' is only available in node. Later node versions (not sure which) make TextEncoder available in the global scope, like web...

> Same problem in Node 14.x This project is running continuous integration on Node 14.5, and there are many tests of the [runtime library](https://github.com/timostamm/protobuf-ts/tree/master/packages/runtime) that will hit TextEncoder, and there...

I can't reproduce with node v14.18.3 either. I suspect this is related to transpilation, or how node is run. I have another project here that also uses TextEncoder where I...

I agree that it's about time for value-options. `long_type`, `client`, `server` and `optimize` are all great candidates for it, and `output_javascript` added by https://github.com/timostamm/protobuf-ts/pull/200 as well. But I'm not sure...

I have never used extension points, but I've heard they might be unpleasant to use. Is it an option to do what you need in runtime? For example, the existing...

The [plan](https://github.com/timostamm/protobuf-ts/issues/356) is to switch to the base types provided by protobuf-es. protobuf-es includes a much improved plugin framework with [@bufbuild/protoplugin](https://github.com/bufbuild/protobuf-es/tree/main/packages/protoplugin), which makes it a whole lot easier to write...