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
TypeScript has an option verbatimModuleSyntax to always import types using the type prefix.
tsc fails to pass the checks.
import{CallOptions,// 'CallOptions' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.ts(1484)ChannelCredentials,Client,ClientOptions,// 'ClientOptions' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.ts(1484)ClientUnaryCall// 'ClientUnaryCall ' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.ts(1484)handleUnaryCall,// 'handleUnaryCall' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.ts(1484)makeGenericClientConstructor,Metadata,ServiceError,// 'ServiceError' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.ts(1484)UntypedServiceImplementation,// 'UntypedServiceImplementation' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.ts(1484)}from"@grpc/grpc-js";
Including the type prefix to the previous variables will fix the issue.
The text was updated successfully, but these errors were encountered:
Hi @Zeswen , the codegen library that we use, ts-poet, has support for type imports by just adding a t: prefix, so changing like imp("CallOptions@@grpc/grpc-js") to imp("t:CallOptions@@grpc/grpc-js").
(The double @@ are weird, but the ts-poet import syntax came from awhile ago, before using @ as an org prefix was popular 🤷 )
But, anyway, this should be a pretty easy fix; if you'd like to work on a PR that just adds t: to the various imps you want changed, that'd be great. Thanks!
TypeScript has an option
verbatimModuleSyntax
to always import types using thetype
prefix.tsc
fails to pass the checks.Including the
type
prefix to the previous variables will fix the issue.The text was updated successfully, but these errors were encountered: