-
Notifications
You must be signed in to change notification settings - Fork 204
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
DurableObject newUniqueId #31
Comments
Can you give a code example that doesn't work @mikecann? I just tried it and it seems to work just fine? const id = ns.newUniqueId()
const stub = ns.get(id)
console.log(stub.id.toString()) |
import { router } from "./routes";
export { UserAggregate } from "./aggregates/user/UserAggregate";
export interface EnvInterface {
UserAggregate: DurableObjectNamespace;
}
export default {
async fetch(request: Request, env: EnvInterface): Promise<Response> {
console.log(`TEST`, env.UserAggregate.newUniqueId());
return new Response(`done`);
},
}; Outputs: I am using esbuild to bundle my worker:
|
scratch that sorry if I do |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This method doesnt seem to be implemented or at least it doesnt seems to be able to generate a string when you call
toString())
on it.The text was updated successfully, but these errors were encountered: