-
Notifications
You must be signed in to change notification settings - Fork 3
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
Typed HyperDurable class methods? #29
Comments
Hi @mpint! 👋 This should work by default, looks like something is up with the type definitions. I'm working off a modified fork where I fixed this, I need to merge my changes. In the meantime, a quick and dirty fix is to cast the namespace proxy with import { HyperNamespaceProxy, proxyHyperDurables } from '@ticketbridge/hyper-durable';
// Proxy the namespace
const proxied = proxyHyperDurables(env, {
// BINDINGNAME: DurableObjectClass
RUBBERDUCK: RubberDuck
});
const RUBBERDUCK = proxied.RUBBERDUCK as HyperNamespaceProxy<RubberDuck, Env>; Please let me know if you run into any other issues. :) |
No worries. The issue might be on my end. Just to elaborate a bit more,
|
Hello, I've been playing around with the library and really enjoying it, but can't figure out how to make
HyperDurable
class methods type safe. Is there a way to get a strongly typed stub?The text was updated successfully, but these errors were encountered: