what do you mean by object functions?
In the meanwhile, the easiest solution by far is just to initialize your sql function in raw js and bind to it:
%%raw(`import Postgres from "postgres"
let sql = Postgres("postgres://xxx:xxxx@localhost:5432/xxxxxx")`)
@taggedTemplate
external sql: (array<string>, array<'sqlParam>) => promise<'data> = "sql"
let foo = sql`hello`