refactor(core): Introduce overload for boolean-type node parameter (no-changelog) (#4647)

* 📘 Set up overloads

* 📘 Add temporary assertion

* 🔥 Remove inferrable boolean assertions

*  Undo autoformatting
This commit is contained in:
Iván Ovejero
2022-11-18 14:31:38 +01:00
committed by GitHub
parent 919cb9180d
commit 6757c9a2ea
163 changed files with 559 additions and 529 deletions

View File

@@ -244,7 +244,7 @@ export class GoogleContacts implements INodeType {
if (operation === 'get') {
const contactId = this.getNodeParameter('contactId', i) as string;
const fields = this.getNodeParameter('fields', i) as string[];
const rawData = this.getNodeParameter('rawData', i) as boolean;
const rawData = this.getNodeParameter('rawData', i);
if (fields.includes('*')) {
qs.personFields = allFields.join(',');
@@ -263,10 +263,10 @@ export class GoogleContacts implements INodeType {
//https://developers.google.com/people/api/rest/v1/people.connections/list
//https://developers.google.com/people/api/rest/v1/people/searchContacts
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
const returnAll = this.getNodeParameter('returnAll', i);
const fields = this.getNodeParameter('fields', i) as string[];
const options = this.getNodeParameter('options', i, {}) as IDataObject;
const rawData = this.getNodeParameter('rawData', i) as boolean;
const rawData = this.getNodeParameter('rawData', i);
const useQuery = this.getNodeParameter('useQuery', i) as boolean;
const endpoint = useQuery ? ':searchContacts' : '/me/connections';