Skip to content

Commit

Permalink
fixed build attempt 2
Browse files Browse the repository at this point in the history
  • Loading branch information
mweststrate committed Jan 30, 2018
1 parent 9b250fd commit 7d2148c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 42 deletions.
42 changes: 0 additions & 42 deletions __tests__/flow/flow.js

This file was deleted.

33 changes: 33 additions & 0 deletions __tests__/flow/flow.js.flow
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// @flow
import produce, {setAutoFreeze, setUseProxies} from "../../src/immer"

setAutoFreeze(true)
setUseProxies(true)

// we really don't want this code to actually execute..
const result = produce({x: 3}, draft => {
draft.x = 4

// $ExpectError
console.log(draft.y)
})

console.log(result.x)

const f2 = produce(draft => {})
f2({x: 3})

// $ExpectError
setAutoFreeze(3)

// $ExpectError
console.log(result.y)

// $ExpectError
produce()

// $ExpectError
produce({x: 3})

// $ExpectError
produce({x: 3}, [])

0 comments on commit 7d2148c

Please sign in to comment.