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 |
||
---|---|---|
.. | ||
npm |