-
Notifications
You must be signed in to change notification settings - Fork 161
crypto
and it's deprecated package
#597
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
Comments
It's a bit ugly, but what if we add an implicit conversion to |
I don't think so. Cos source-compat is the concern the direct import statements would stop working. Plus maybe it wouldn't be worth it if the cost is an implicit anyway :) |
Right, imports 😕 Regarding your idea 2, we already have a deprecated |
Oh another idea, we could add object Crypto {
def ifAvailable: js.UndefOr[Cypto]
} It would be the same as option 2 above except instead of |
Nice, so we'll go with a 2x option? Do you have a preference between |
IMO |
ok np, I'll do PR that after #588 is in 👍 |
Closes #597 I orginally thought the type would be js.UndefOr[Crypto] but according to MDN, `crypto` is always available but not all of the methods are.
Closes #597 I orginally thought the type would be js.UndefOr[Crypto] but according to MDN, `crypto` is always available but not all of the methods are.
I'd really love to have
dom.crypto
be of typejs.UndefOr[Crypto]
. It seems the impediment is the old deprecated package with the same name.These are my ideas:
change
dom.crypto
to be of typejs.UndefOr[Crypto with DeprecatedCryptoPackage]
so that at least in userland we can use itCrypto
-- actually this won't work - deprecated crypto imports wouldn't be stable, not to mention that there's ajs.UndefOr
thereBuilding on @sjrd's suggestion we could keep The great migration to
dom
#588 as it but also add awebCrypto: js.UndefOr[Crypto]
which we could deprecate in 3.x to be replaced bycrypto
just nuke the deprecated package, 2.0 is a new world
Any more ideas? I'm kinda happy with 3, but 2 would definitely be acceptable.
The text was updated successfully, but these errors were encountered: