Skip to content
Myr

fixed build attempt 2

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

authored by Michel Weststrate · committed by Michel Weststrate · parent 9b250fd · Browse files · 2 files+33 added−42 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+33 added−42 removed

  • tests:+33 added−42 removed

2 files+33 added−42 removed

deleted:__tests__/flow/flow.js-42 removed
added:__tests__/flow/flow.js.flow+33 added
1// @flow2import produce, {setAutoFreeze, setUseProxies} from "../../src/immer"34setAutoFreeze(true)5setUseProxies(true)67// we really don't want this code to actually execute..8const result = produce({x: 3}, draft => {9 draft.x = 41011 // $ExpectError12 console.log(draft.y)13})1415console.log(result.x)1617const f2 = produce(draft => {})18f2({x: 3})1920// $ExpectError21setAutoFreeze(3)2223// $ExpectError24console.log(result.y)2526// $ExpectError27produce()2829// $ExpectError30produce({x: 3})3132// $ExpectError33produce({x: 3}, [])