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

@@ -191,7 +191,7 @@ export class CoinGecko implements INodeType {
}
//https://www.coingecko.com/api/documentations/v3#/coins/get_coins_list
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
const returnAll = this.getNodeParameter('returnAll', i);
let limit;
@@ -205,7 +205,7 @@ export class CoinGecko implements INodeType {
//https://www.coingecko.com/api/documentations/v3#/coins/get_coins_list
if (operation === 'market') {
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
const returnAll = this.getNodeParameter('returnAll', i);
const baseCurrency = this.getNodeParameter('baseCurrency', i) as string;
const options = this.getNodeParameter('options', i) as IDataObject;
@@ -272,7 +272,7 @@ export class CoinGecko implements INodeType {
//https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id__tickers
if (operation === 'ticker') {
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
const returnAll = this.getNodeParameter('returnAll', i);
const coinId = this.getNodeParameter('coinId', i) as string;
const options = this.getNodeParameter('options', i) as IDataObject;
@@ -410,7 +410,7 @@ export class CoinGecko implements INodeType {
if (resource === 'event') {
//https://www.coingecko.com/api/documentations/v3#/events/get_events
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
const returnAll = this.getNodeParameter('returnAll', i);
const options = this.getNodeParameter('options', i) as IDataObject;
Object.assign(qs, options);