Skip to content
Myr

flow.js.flow

This file

Path

__tests__/flow/flow.js.flow

33 lines · 521 bytes

Last changed by

fixed build attempt 2Michel Weststratebefore adoption7d2148c

History of this file

Take it

fixed build attempt 2Michel Weststratebefore adoption7d2148c

lines 1–33why, one step back
1// @flow
2import 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}, [])