refactor(core): Introduce overload for record-type node parameter (no-changelog) (#4648)

* 📘 Set up overload

* 🔥 Remove inferrable record assertions

* 👕 Fix semicolon

* 👕 Fix another semicolon
This commit is contained in:
Iván Ovejero
2022-11-18 16:29:44 +01:00
committed by GitHub
parent 0565194473
commit 0d9eeea024
202 changed files with 1003 additions and 985 deletions

View File

@@ -164,7 +164,7 @@ export class GoogleCalendar implements INodeType {
const calendarId = this.getNodeParameter('calendar', i) as string;
const timeMin = this.getNodeParameter('timeMin', i) as string;
const timeMax = this.getNodeParameter('timeMax', i) as string;
const options = this.getNodeParameter('options', i) as IDataObject;
const options = this.getNodeParameter('options', i);
const outputFormat = options.outputFormat || 'availability';
const body: IDataObject = {
@@ -208,7 +208,7 @@ export class GoogleCalendar implements INodeType {
const start = this.getNodeParameter('start', i) as string;
const end = this.getNodeParameter('end', i) as string;
const useDefaultReminders = this.getNodeParameter('useDefaultReminders', i) as boolean;
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
const additionalFields = this.getNodeParameter('additionalFields', i);
if (additionalFields.maxAttendees) {
qs.maxAttendees = additionalFields.maxAttendees as number;
@@ -353,7 +353,7 @@ export class GoogleCalendar implements INodeType {
if (operation === 'delete') {
const calendarId = this.getNodeParameter('calendar', i) as string;
const eventId = this.getNodeParameter('eventId', i) as string;
const options = this.getNodeParameter('options', i) as IDataObject;
const options = this.getNodeParameter('options', i);
if (options.sendUpdates) {
qs.sendUpdates = options.sendUpdates as number;
}
@@ -369,7 +369,7 @@ export class GoogleCalendar implements INodeType {
if (operation === 'get') {
const calendarId = this.getNodeParameter('calendar', i) as string;
const eventId = this.getNodeParameter('eventId', i) as string;
const options = this.getNodeParameter('options', i) as IDataObject;
const options = this.getNodeParameter('options', i);
if (options.maxAttendees) {
qs.maxAttendees = options.maxAttendees as number;
}
@@ -388,7 +388,7 @@ export class GoogleCalendar implements INodeType {
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i);
const calendarId = this.getNodeParameter('calendar', i) as string;
const options = this.getNodeParameter('options', i) as IDataObject;
const options = this.getNodeParameter('options', i);
if (options.iCalUID) {
qs.iCalUID = options.iCalUID as string;
}
@@ -448,7 +448,7 @@ export class GoogleCalendar implements INodeType {
const calendarId = this.getNodeParameter('calendar', i) as string;
const eventId = this.getNodeParameter('eventId', i) as string;
const useDefaultReminders = this.getNodeParameter('useDefaultReminders', i) as boolean;
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
const updateFields = this.getNodeParameter('updateFields', i);
const timezone = updateFields.timezone as string;
if (updateFields.maxAttendees) {