Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatability with verbatimModuleSyntax #114

Open
LoaderB0T opened this issue Aug 21, 2024 · 0 comments · May be fixed by #115
Open

Incompatability with verbatimModuleSyntax #114

LoaderB0T opened this issue Aug 21, 2024 · 0 comments · May be fixed by #115

Comments

@LoaderB0T
Copy link

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

@LoaderB0T LoaderB0T linked a pull request Aug 21, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant