Skip to content

Commit 4aa1425

Browse files
authored
docs: default data required (#572)
1 parent f58dfab commit 4aa1425

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ type Data = {
109109

110110
const defaultData: Data = { messages: [] }
111111
const adapter = new JSONFile<Data>('db.json')
112-
const db = new Low<Data>(adapter)
112+
const db = new Low<Data>(adapter, defaultData)
113113

114114
db.data.messages.push('foo') // ✅ Success
115115
db.data.messages.push(1) // ❌ TypeScript error

0 commit comments

Comments
 (0)