Skip to content

types(dia.Paper): add CellViewCallback type for elementView/linkView#3283

Merged
Geliogabalus merged 1 commit into
clientIO:masterfrom
kumilingus:types/cell-view-callback
Apr 20, 2026
Merged

types(dia.Paper): add CellViewCallback type for elementView/linkView#3283
Geliogabalus merged 1 commit into
clientIO:masterfrom
kumilingus:types/cell-view-callback

Conversation

@kumilingus

Copy link
Copy Markdown
Contributor

Summary

  • Add generic Paper.CellViewCallback<V> type that infers the model type from the view class
  • Simplify elementView / linkView option signatures using the new type
  • Change ElementView<any> / LinkView<any> to ElementView<Element> / LinkView<Link> for stricter typing (custom subclasses still accepted via covariance)

🤖 Generated with Claude Code

…options

Introduce a generic CellViewCallback type in the Paper namespace that
infers the model type from the view class. Replaces verbose inline
function signatures for elementView and linkView options.

Also changes ElementView<any>/LinkView<any> to ElementView<Element>/
LinkView<Link> for stricter typing while still accepting custom subclasses.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kumilingus kumilingus requested a review from Geliogabalus April 18, 2026 09:17
@Geliogabalus Geliogabalus merged commit fdbf849 into clientIO:master Apr 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants