ngx-grpc
ngx-grpc copied to clipboard
Incompatability with verbatimModuleSyntax
Hi there,
we just discovered that the protoc-gen-ng package is incompatible with the verbatimModuleSyntax
flag in the tsconfig.
An example of what gets generated:
import {
GrpcCallType,
GrpcClient,
GrpcClientFactory,
GrpcEvent,
GrpcMetadata,
} from '@ngx-grpc/common';
However, some of these imports have to be imported with the type
keyword when using verbatimModuleSyntax
So for this example, the correct import statement would be:
import {
GrpcCallType,
type GrpcClient,
type GrpcClientFactory,
type GrpcEvent,
GrpcMetadata,
} from '@ngx-grpc/common';
Since Angular 18.2 using isolatedModules
in the tsconfig provides a performance boost and the developer experience is better when using verbatimModuleSyntax
as the auto imports eg. in vscode are more usable that way.
I will create a PR with a proposal for a fix shortly. Note: changing this does NOT create a breaking change