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

@@ -363,7 +363,7 @@ export class InvoiceNinja implements INodeType {
responseData = responseData.data;
}
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
const returnAll = this.getNodeParameter('returnAll', 0);
const options = this.getNodeParameter('options', i) as IDataObject;
if (options.include) {
qs.include = options.include as string;
@@ -521,7 +521,7 @@ export class InvoiceNinja implements INodeType {
responseData = responseData.data;
}
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
const returnAll = this.getNodeParameter('returnAll', 0);
const options = this.getNodeParameter('options', i) as IDataObject;
if (options.include) {
qs.include = options.include as string;
@@ -617,7 +617,7 @@ export class InvoiceNinja implements INodeType {
responseData = responseData.data;
}
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
const returnAll = this.getNodeParameter('returnAll', 0);
const options = this.getNodeParameter('options', i) as IDataObject;
if (options.include) {
qs.include = options.include as string;
@@ -689,7 +689,7 @@ export class InvoiceNinja implements INodeType {
responseData = responseData.data;
}
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
const returnAll = this.getNodeParameter('returnAll', 0);
const options = this.getNodeParameter('options', i) as IDataObject;
if (options.include) {
qs.include = options.include as string;
@@ -794,7 +794,7 @@ export class InvoiceNinja implements INodeType {
responseData = responseData.data;
}
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
const returnAll = this.getNodeParameter('returnAll', 0);
if (returnAll === true) {
responseData = await invoiceNinjaApiRequestAllItems.call(
this,
@@ -951,7 +951,7 @@ export class InvoiceNinja implements INodeType {
responseData = responseData.data;
}
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
const returnAll = this.getNodeParameter('returnAll', 0);
const options = this.getNodeParameter('options', i) as IDataObject;
if (options.include) {
qs.include = options.include as string;