-
Notifications
You must be signed in to change notification settings - Fork 34
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
EnumCase with Infinity not supported #444
Comments
I don't think we can set an enum with How is |
I assume it's the same as type ParseSpeeds =
| Fastest = System.Double.PositiveInfinity
| Fast = 1500
| Medium = 500
| Slow = 100 I'm thinking now that we added type ParseSpeeds =
| [<Emit("Infinity")>] Fastest = 100000000 // Dummy number
| Fast = 1500
| Medium = 500
| Slow = 100 |
Thanks for checking, yes that's a good fix. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity Infinity is a property of the global object. In other words, it is a variable in global scope. The initial value of Infinity is Number.POSITIVE_INFINITY. The value Infinity (positive infinity) is greater than any other number. |
Tried to convert pdf-lib: https://www.npmjs.com/package/pdf-lib
ts2fable node_modules/pdf-lib/cjs/index.d.ts pdfLib.fs -e pdf-lib
export declare enum ParseSpeeds {
Fastest = Infinity,
Fast = 1500,
Medium = 500,
Slow = 100
}
I locally set: Fastest = 100000 to skip that error
The text was updated successfully, but these errors were encountered: