[SOLVED]
Actually was simple. Here is the code in JS:
let v0 = vertex({pos:vec..., color:color.yellow})
let v1 = vertex({pos:vec..., color:color.yellow})
let v2 = vertex({pos:vec..., color:color.yellow})
triangle({v0:v0, v1:v1, v2:v2})
The error that I made was to not add all the necessary info and the right sentence for the command!!!