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>
Languages
TypeScript
75.6%
JavaScript
12.4%
HTML
8.8%
CSS
2.6%
PHP
0.4%
Other
0.2%