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
when the TypeScript configuration option isolatedModules is active, then the compilation of the generated .ts files fails as they only import types but the imports are not properly marked as such.
Type-only imports should use import type { Type } instead of import { Type }.
This change should not be an issue for any TypeScript project that uses TypeScript >=3.8.
Because of the issue mentioned above, running my Vue3 project with vite fails with a runtime error like this Uncaught SyntaxError: The requested module '/src/_generated/Namespace.Hubs.ts' does not provide an export named 'MyType' (at Namespace.Hubs.ts:6:23).
The text was updated successfully, but these errors were encountered:
I have several projects using TypedSignalR.Client.TypeScript with isolatedModules is true, and they wrok fine. Perhaps the problem is not caused by the isolatedModules setting.
I have several projects using TypedSignalR.Client.TypeScript with isolatedModules is true, and they wrok fine. Perhaps the problem is not caused by the isolatedModules setting.
Yeah you are right, I confused this with preserveValueImports in combination with importsNotUsedAsValues. Vite uses esbuild to compile TypeScript code and esbuild requires import type because of the mentioned options.
Hi there,
when the TypeScript configuration option
isolatedModules
is active, then the compilation of the generated .ts files fails as they only import types but the imports are not properly marked as such.Type-only imports should use
import type { Type }
instead ofimport { Type }
.This change should not be an issue for any TypeScript project that uses TypeScript >=3.8.
Because of the issue mentioned above, running my Vue3 project with vite fails with a runtime error like this
Uncaught SyntaxError: The requested module '/src/_generated/Namespace.Hubs.ts' does not provide an export named 'MyType' (at Namespace.Hubs.ts:6:23)
.The text was updated successfully, but these errors were encountered: