Page 1 of 1

FullCalendar - Unknown Type Warnings

PostPosted: Fri Jun 26, 2020 5:01 pm
by Louis.Winter
I am adding a FullCalendar to my app and have run into some JSDoc issues. I added the current FullCalendar version (1.1.2) via the Servoy Package Manager, created a new form, and added the FullCalendar to the new form. The issue is that when I try to create a variable of type "svy-fullcalendar.FullCalendarOptions" (which I copied from directly from the demo), I get an "Unknown type svy-fullcalendar.FullCalendarOptions" warning.

This what I have so far for code (this is just the beginning and is not complete):

Code: Select all
/**
* @return {svy-fullcalendar.FullCalendarOptions}
* @properties={typeid:24,uuid:"F6F5CB00-B086-45E0-AFEF-573ACEB3824F"}
*/
function getOptions() {
   /** @type {svy-fullcalendar.FullCalendarOptions} */
   var options = {
      allDayText: '',
      businessHours: {
         start: '08:00:00',
         end: '17:00:00',
         dow: [1,2,3,4,5]
      },
      columnFormat: {
         month: 'ddd',
         week: 'ddd M/D',
         day: 'dddd M/D'
      }
   };
   
   return options;
}


How do I get the Servoy Developer to know what "svy-fullcalendar.FullCalendarOptions" (and all of the other svy-fullcalendar types) are?

Thanks,
Louis

Re: FullCalendar - Unknown Type Warnings

PostPosted: Thu Jul 02, 2020 2:15 pm
by drookwood
Hi Louise,

I have the same issue with the Unknown type warning - did you find a solution?

Re: FullCalendar - Unknown Type Warnings

PostPosted: Thu Jul 02, 2020 5:48 pm
by patrick
I don't have the full calendar component installed right now, but any component's custom types should be typed as CustomType<component-type>. You should also get code completion of these.

Re: FullCalendar - Unknown Type Warnings

PostPosted: Thu Jul 02, 2020 7:38 pm
by drookwood
Perfect!
Thanks Patrick