Skip to content
Myr

fix: consistent naming for castDraft, fixup 2d27f33f6

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Denis Sokolov · committed by Denis Sokolov · parent ab3b8d0 · Browse files · 2 files+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+3 added−3 removed

  • tests:+2 added−2 removed
  • other:+1 added−1 removed

2 files+3 added−3 removed

modified:__tests__/draft.ts+2 added-2 removed
302 unmodified lines
303304 expect(true).toBe(true)305})306307test("asDraft", () => {307test("castDraft", () => {308 type Todo = {readonly done: boolean}309310 type State = {311 readonly finishedTodos: ReadonlyArray<Todo>
13 unmodified lines
325 original(draftState.users) === baseState.users326 })327})328329test("asDraft preserves a value", () => {329test("castDraft preserves a value", () => {330 const x = {}331 expect(castDraft(x)).toBe(x)332})333
4 unmodified lines
modified:docs/typescript.md+1 added-1 removed