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
Hey, so I noticed that using uint64s are bit harder with protobuf. Seems you need an additional library to handle them with JS. While I'm sure the long library works fine, it seems there's something wrong with the import syntax.
As of now, when I compile my proto files it produces a .ts file with import Long = require("long"); statement that my tsc fails to compile throwing:
error TS1202: ImportassignmentcannotbeusedwhentargetingECMAScriptmodules.Considerusing'import * as ns from "mod"','import {a} from "mod"','import d from "mod"',oranother module formatinstead.4importLong=require("long");
In the PR which adds this #882 it says it should use import Long from "long" when "esModuleInterop": true which should work. But even though I have it enabled, it uses the incorrect import syntax.
I can add a reproduction if necessary. I am using "ts-proto": "1.155.1" and "typescript": "4.9.4"
The text was updated successfully, but these errors were encountered:
Hey, so I noticed that using uint64s are bit harder with protobuf. Seems you need an additional library to handle them with JS. While I'm sure the
long
library works fine, it seems there's something wrong with the import syntax.As of now, when I compile my proto files it produces a
.ts
file withimport Long = require("long");
statement that mytsc
fails to compile throwing:In the PR which adds this #882 it says it should use
import Long from "long"
when"esModuleInterop": true
which should work. But even though I have it enabled, it uses the incorrect import syntax.I can add a reproduction if necessary. I am using "ts-proto": "1.155.1" and "typescript": "4.9.4"
The text was updated successfully, but these errors were encountered: