Example:
const columns = ['circle', 'square', 'triangle']
db.any('SELECT ($1:csv) FROM table', [columns])
But, unfortunately, this option gives an error - operator does not exist: integer[] @> text[]
If these are actually column names that you want to select:
const columns = ['circle', 'square', 'triangle'];
then the correct syntax is:
db.any('SELECT $1:name FROM table', [columns])
as per the SQL Names documentation ;)