Skip to content

Commit 5345888

Browse files
committed
docs(array): update
1 parent beda104 commit 5345888

File tree

5 files changed

+921
-53
lines changed

5 files changed

+921
-53
lines changed

src/draft.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ import { generatePatches } from './patch';
3636

3737
// The array methods that need to be handled by the draft.
3838
// `sort` is not included, because array items may be modified by mutations in the sort function, it has to be drafted.
39+
// `copyWithin` is not included, it would require implementing a complete check of array copy reference relationships,
40+
// which might result in limited performance gains and increased maintenance complexity.
3941
const proxyArrayMethods = ['splice', 'shift', 'unshift', 'reverse'];
4042

4143
const proxyHandler: ProxyHandler<ProxyDraft> = {

0 commit comments

Comments
 (0)