Skip to content

Commit

Permalink
fix(deserializer): apply concrete type while avoiding circular depend…
Browse files Browse the repository at this point in the history
…ency
  • Loading branch information
DASPRiD committed Oct 17, 2024
1 parent f2d8e5f commit 7ac1a8b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/deserializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,24 @@ export type AnyReferenceRelationshipDeserializer = ReferenceRelationshipDeserial

export type IncludedRelationshipDeserializer<
TRelationshipType extends RelationshipType,
TInclude extends ResourceDeserializer,
TInclude extends AnyResourceDeserializer,
> = {
relationshipType: TRelationshipType;
include: TInclude;
};

export type AnyIncludedRelationshipDeserializer = IncludedRelationshipDeserializer<
RelationshipType,
ResourceDeserializer
ResourceDeserializer<
string,
AttributesSchema | undefined,
// biome-ignore lint/suspicious/noExplicitAny: required to avoid circular dependency
any,
LinksSchema | undefined,
MetaSchema | undefined,
MetaSchema | undefined,
boolean | undefined
>
>;

export type AnyRelationshipDeserializer =
Expand Down

0 comments on commit 7ac1a8b

Please sign in to comment.