Skip to content

Commit

Permalink
fix(sdks/actor/runtime): work around typescript bug inferring ConnPar…
Browse files Browse the repository at this point in the history
…ams with ExtractActorConnParams (#1951)

<!-- Please make sure there is an issue that this PR is correlated to. -->

## Changes

<!-- If there are frontend changes, please include screenshots. -->
  • Loading branch information
NathanFlurry committed Jan 30, 2025
1 parent d1c8e27 commit 070af03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdks/actor/runtime/src/actor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export interface SaveStateOptions {
// biome-ignore lint/suspicious/noExplicitAny: Needs to be used in `extends`
export type AnyActor = Actor<any, any, any>;

export type ExtractActorConnParams<A> = A extends Actor<
export type ExtractActorConnParams<A extends AnyActor> = A extends Actor<
// biome-ignore lint/suspicious/noExplicitAny: Must be used for `extends`
any,
infer ConnParams,
Expand All @@ -86,7 +86,7 @@ export type ExtractActorConnParams<A> = A extends Actor<
? ConnParams
: never;

export type ExtractActorConnState<A> = A extends Actor<
export type ExtractActorConnState<A extends AnyActor> = A extends Actor<
// biome-ignore lint/suspicious/noExplicitAny: Must be used for `extends`
any,
// biome-ignore lint/suspicious/noExplicitAny: Must be used for `extends`
Expand Down

0 comments on commit 070af03

Please sign in to comment.