Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions src/workerd/api/actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,11 @@ class DurableObjectId: public jsg::Object {
return id->getJurisdiction();
}

JSG_RESOURCE_TYPE(DurableObjectId, CompatibilityFlags::Reader flags) {
JSG_RESOURCE_TYPE(DurableObjectId) {
JSG_METHOD(toString);
JSG_METHOD(equals);
JSG_READONLY_INSTANCE_PROPERTY(name, getName);
if (flags.getWorkerdExperimental()) {
// `jurisdiction` is marked as experimental because it will be undefined when called on the
// `DurableObjectId` stored within a Durable Object class as `this.ctx.id`.
//
// TODO(soon): Ensure that `jurisdiction` is always available on a `DurableObjectId`.
JSG_READONLY_INSTANCE_PROPERTY(jurisdiction, getJurisdiction);
}
JSG_READONLY_INSTANCE_PROPERTY(jurisdiction, getJurisdiction);
}

void visitForMemoryInfo(jsg::MemoryTracker& tracker) const {
Expand Down
1 change: 1 addition & 0 deletions types/generated-snapshot/latest/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,7 @@ interface DurableObjectId {
toString(): string;
equals(other: DurableObjectId): boolean;
readonly name?: string;
readonly jurisdiction?: string;
}
declare abstract class DurableObjectNamespace<
T extends Rpc.DurableObjectBranded | undefined = undefined,
Expand Down
1 change: 1 addition & 0 deletions types/generated-snapshot/latest/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@ export interface DurableObjectId {
toString(): string;
equals(other: DurableObjectId): boolean;
readonly name?: string;
readonly jurisdiction?: string;
}
export declare abstract class DurableObjectNamespace<
T extends Rpc.DurableObjectBranded | undefined = undefined,
Expand Down
Loading