How to set LIMIT property with redis ft.SEARCH in TypeScript

Code:

  client.ft.SEARCH('license-index-json',"@\\$\\" + ".reservedForApplicationName:GSTest",{
    LIMIT: {
      from: 0,
      to: 1
    }
  })

Error:

Argument of type '["license-index-json", string, { LIMIT: { from: number; to: number; }; }]' is not assignable to parameter of type '[index: string, query: string, options?: SearchOptions] | [options: CommandOptions, index: string, query: string, options?: SearchOptions]'. Type '["license-index-json", string, { LIMIT: { from: number; to: number; }; }]' is not assignable to type '[options: CommandOptions, index: string, query: string, options?: SearchOptions]'. Type at position 0 in source is not compatible with type at position 0 in target. Type 'string' is not assignable to type 'CommandOptions'. Type 'string' is not assignable to type '{ readonly [symbol]: true; }'.ts(2345)

redisearch limit expects “from” and “size”, not “from” and “to”:

client.ft.SEARCH('license-index-json',"@\\$\\" + ".reservedForApplicationName:GSTest",{
  LIMIT: {
    from: 0,
    size: 1
  }
});