0

I have Typescript code, where I need to set width of fancy box

Here is script code

 export module Step2{
    export function loading(){
    Tabs.customCheckbox("conditions");
    Tabs.customCheckbox("newsletter");
    $('select.custom1').selectmenu();

    LoadActions.load_passenger_datepickers();
    LoadActions.load_field_actions();
    LoadActions.load_button_actions();
    LoadActions.load_form_actions();
    $('.fancybox').fancybox();
    $('.fancyconditions').fancybox({ width: '60%', height: '60%', baseClass: 'fancyconditions' });
    $('.tip').tooltipster({ contentAsHTML: true });

    $('.bonuscard_info').toggle();
    if (gon && gon.search['id']) { CheckStatus.check_status(); }

    if (localStorage.getItem('rescheduled_flight') === '1') {
      localStorage.removeItem('rescheduled_flight');
      Track.log_event("Show rescheduled flight");
      return $.fancybox.open($('#step_2_rescheduled'));
    }
    }
};

But here $('.fancyconditions').fancybox({ width: '60%', height: '60%', baseClass: 'fancyconditions' });

I get error

Argument of type '{ width: string; height: string; baseClass: string; }' is not assignable to parameter of type 'any[]'. Object literal may only specify known properties, and 'width' does not exist in type 'any[]'.

How I can solve it?

Silco
  • 59
  • 1
  • 7

0 Answers0