Skip to content

Commit

Permalink
Improve TadaDocumentNode readability
Browse files Browse the repository at this point in the history
  • Loading branch information
kitten committed Jan 10, 2024
1 parent a8678c6 commit 31418b7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/namespace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ type decorateFragmentDef<Document extends DocumentNodeLike> = Document['definiti
name: any;
typeCondition: any;
}
? obj<Document['definitions'][0] & { readonly [$tada.fragmentId]: unique symbol }>
? {
// NOTE: This is a shortened definition for readability in LSP hovers
kind: Kind.FRAGMENT_DEFINITION;
name: Document['definitions'][0]['name'];
typeCondition: Document['definitions'][0]['typeCondition'];
readonly [$tada.fragmentId]: unique symbol;
}
: never;

type getFragmentsOfDocumentsRec<Documents> = Documents extends readonly [
Expand Down

0 comments on commit 31418b7

Please sign in to comment.