import { Statement } from 'better-sqlite3'; import db from '.'; export const sql = = []>( literals: TemplateStringsArray, ...placeholders: Array ): Statement => { let string = ''; for (let n = 0; n < placeholders.length; n += 1) { string += literals[n]; string += placeholders[n]; } string += literals[literals.length - 1]; return db.prepare(string); };