ebb8fe102756a7f731a90e47c5ce9d90e57ef210
applyPatch's `ops` param was typed `any[]`, discarding the SitesmithPatchOp discriminated union that SitesmithResponse.ops already carried at the call site. Type it ops: SitesmithPatchOp[] so op.props/op.tree/op.op narrow correctly per-variant in the switch instead of being `any`, and update the unit tests' inline op literals to SitesmithPatchOp[] so tsc checks them too. SerializedTreeNode/SitesmithPatchOp themselves, and buildNodeTree/ sanitizeAiTree's tree params, were already typed from a prior task -- this closes the one remaining any at the op-handling site. Runtime validation (protected-key guard, style-merge guard, unknown-resolvedName soft-skip) is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Description
Visual drag-and-drop website builder using GrapesJS
Languages
TypeScript
61.2%
HTML
17.1%
JavaScript
17%
CSS
3.6%
PHP
0.8%
Other
0.3%