Skip to content

Commit

Permalink
types: Improve proxyHyperDurable types
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis Frank committed Jun 15, 2022
1 parent ba059af commit 7937367
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ticketbridge/hyper-durable",
"version": "0.1.16",
"version": "0.1.17",
"description": "Object-like access to Durable Object properties and methods",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ export class HyperNamespaceProxy<DO extends HyperDurable<any, Env>, Env> {
}

// TODO: Don't rely on undocumented behavior
export function proxyHyperDurables<Bindings extends Record<K, typeof DO>, Env, K extends string, DO extends HyperDurable<any, Env>>(
export function proxyHyperDurables<Bindings extends Record<K, DO>, Env, K extends string, DO extends InstanceType<HyperDurable<any, Env>>>(
env: Env,
doBindings: Bindings
): {
[Prop in keyof Bindings]: HyperNamespaceProxy<Bindings[Prop], Env>
[Prop in keyof Bindings]: HyperNamespaceProxy<typeof Bindings[Prop], Env>
}

0 comments on commit 7937367

Please sign in to comment.