Skip to content

fix(types): fix Paper class method parameter typings in joint.d.ts#3195

Open
Geliogabalus wants to merge 2 commits intoclientIO:masterfrom
Geliogabalus:typings-fix
Open

fix(types): fix Paper class method parameter typings in joint.d.ts#3195
Geliogabalus wants to merge 2 commits intoclientIO:masterfrom
Geliogabalus:typings-fix

Conversation

@Geliogabalus
Copy link
Contributor

Summary

  • Fix FORM_CONTROLS_TAG_NAMESFORM_CONTROL_TAG_NAMES (typo, matches implementation)
  • Fix insertLayerView second param from before?: Paper.LayerRef to beforeLayerView: LayerView | null (matches actual resolved type passed by callers)
  • Fix requestLayerViewRemoval — add missing opt? parameter
  • Fix checkMountedViews / checkUnmountedViews — widen first param from ViewportCallback to ViewportCallback | CellVisibilityCallback | null
  • Fix sortViews / sortViewsExactsortLayerViews / sortLayerViewsExact (correct method names)
  • Fix drawBackgroundImageimg now accepts null, opt is optional
  • Fix updateBackgroundColorcolor is optional (called with potentially-undefined values)
  • Fix createViewForModel — add missing cid?: string parameter
  • Fix cloneOptions — return type Paper.Optionsvoid (no return statement in implementation)
  • Fix onGraphLayerCollectionSort — param type GraphLayer[]mvc.Collection<GraphLayer> with correct name layerCollection
  • Fix onGraphBatchStop (Paper class) — add missing data?: { batchName: string } parameter
  • Fix renderView — add missing opt? parameter

Test plan

  • Run yarn test-ts to validate TypeScript definition correctness

🤖 Generated with Claude Code

@kumilingus kumilingus requested a review from Copilot March 2, 2026 14:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants