Skip to content
Myr

test(ts): tiny improvement

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

authored by aleclarson · committed by aleclarson · parent dd25143 · Browse files · 1 file+3 added−2 removed
This commit

State

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

Diff stats

1 file+3 added−2 removed

  • tests:+3 added−2 removed

1 file+3 added−2 removed

modified:__tests__/produce.ts+3 added-2 removed
181 unmodified lines
182 let val: undefined = produce({}, s => nothing)183})184185it("works with `void` hack", () => {186 let obj: {readonly a: number} = {a: 1}187 let val: typeof obj = produce(obj, s => void s.a++)186 let obj = {} as {readonly a: number}187 let res = produce(obj, s => void s.a++)188 exactType(res, obj)189})190191it("works with generic parameters", () => {192 let insert = <T>(array: ReadonlyArray<T>, index: number, elem: T) => {
11 unmodified lines