51461f4842
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 |
||
---|---|---|
.. | ||
better-sqlite3_vx.x.x.js | ||
chalk_v1.x.x.js | ||
dotenv_v4.x.x.js | ||
enzyme_v3.x.x.js | ||
express_v4.16.x.js | ||
flow-bin_v0.x.x.js | ||
isomorphic-fetch_v2.x.x.js | ||
jest_v23.x.x.js | ||
mkdirp_v0.5.x.js | ||
object-assign_v4.x.x.js | ||
prettier_v1.x.x.js | ||
react-scripts_vx.x.x.js |