fix: typings

This commit is contained in:
Reinaldy Rafli 2021-07-11 21:10:22 +07:00
parent e9c2153538
commit 8583fc7f48
2 changed files with 2 additions and 3 deletions

View File

@ -12,7 +12,6 @@ export default {
format: 'esm',
},
],
external: ['crypto', 'fs', 'path'],
plugins: [
ts(),
],

View File

@ -1,6 +1,6 @@
export interface SqlObject {
sql: string
values: TemplateStringsArray
values: any[]
formatQuestion?: () => SqlObject
formatColon?: () => SqlObject
formatAtP?: () => SqlObject
@ -22,7 +22,7 @@ export interface SqlObject {
* const colon = query.formatColon()
* // colon.sql = 'select * from users where email = :1'
*/
export function sql(string: string[], ...params: TemplateStringsArray): SqlObject {
export function sql(string: TemplateStringsArray, ...params: any[]): SqlObject {
const sql = string.map((v, i) => (string.length - 1 === i) ? v : `${v}$${i + 1}`).join('');
function formatQuestion(): SqlObject {