Create GIN index in Postgres

Ppdina5/18/2023
I need to create this index in postgres:

CREATE INDEX users_name_gin_trgm_idx ON users USING gin (name gin_trgm_ops);


and this is the code I have:

export const UserModel = pgTable(
    'users',
    {
      id: serial('id').primaryKey(),
      name: varchar('name'),
      email: varchar('email', { length: 255 })
    },
    (table) => {
      return {
        name: index('name').on(table.name)
        // SPACE FOR INDEX DECLARATION!
      };
    }
);


Reading the docs on GitHub I was able to create "normal" index, but it's not clear how to specify index configuration options (like the type of index etc).
Ppdina5/19/2023
what I tried (not working):

...
(table) => {
    return {
      name: index('name')
        .on(table.name)
        .using(sql`gin (${table.name} gin_trgm_ops)`)
      };
    }
}
...
Oookamiiixd5/20/2023
Maybe it's something related with this limitation?