sourcecred/flow-typed/npm
William Chargin 51461f4842
flow: mark bound parameters as covariant (#842)
Summary:
Before this patch, an object whose type has read-only attributes cannot
be passed to `stmt.run`/etc., because the libdef does not promise not to
mutate its argument. This patch fixes that oversight.

Test Plan:
Create the following test file, and note that it fails to typecheck
before this change but passes after:

```js
// @flow
import Database from "better-sqlite3";
const db = new Database("/tmp/foo");
const args: {|+id: number|} = {id: 1};
db.prepare("INSERT INTO foo (id) VALUES (?)").run(args);
```

wchargin-branch: flow-better-sqlite3-bound-parameters-covariant
2018-09-17 11:15:04 -07:00
..
better-sqlite3_vx.x.x.js flow: mark bound parameters as covariant (#842) 2018-09-17 11:15:04 -07:00
chalk_v1.x.x.js Add all available flow-typed libdefs (#548) 2018-07-27 17:23:24 -07:00
dotenv_v4.x.x.js Add all available flow-typed libdefs (#548) 2018-07-27 17:23:24 -07:00
enzyme_v3.x.x.js Add all available flow-typed libdefs (#548) 2018-07-27 17:23:24 -07:00
express_v4.16.x.js Upgrade Flow to v0.76.0 (#546) 2018-07-27 15:54:59 -07:00
flow-bin_v0.x.x.js Move package json to root (#37) 2018-02-26 22:32:23 -08:00
isomorphic-fetch_v2.x.x.js Add all available flow-typed libdefs (#548) 2018-07-27 17:23:24 -07:00
jest_v23.x.x.js Upgrade jest to 23.4.1 (#537) 2018-07-27 12:28:04 -07:00
mkdirp_v0.5.x.js Add all available flow-typed libdefs (#548) 2018-07-27 17:23:24 -07:00
object-assign_v4.x.x.js Add all available flow-typed libdefs (#548) 2018-07-27 17:23:24 -07:00
prettier_v1.x.x.js Add all available flow-typed libdefs (#548) 2018-07-27 17:23:24 -07:00
react-scripts_vx.x.x.js Move package json to root (#37) 2018-02-26 22:32:23 -08:00