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

@@ -197,7 +197,7 @@ export class Grafana implements INodeType {
Object.assign(qs, filters);
}
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
const returnAll = this.getNodeParameter('returnAll', i);
if (!returnAll) {
const limit = this.getNodeParameter('limit', i) as number;
@@ -321,7 +321,7 @@ export class Grafana implements INodeType {
responseData = await grafanaApiRequest.call(this, 'GET', '/teams/search', {}, qs);
responseData = responseData.teams;
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
const returnAll = this.getNodeParameter('returnAll', i);
if (!returnAll) {
const limit = this.getNodeParameter('limit', i) as number;
@@ -404,7 +404,7 @@ export class Grafana implements INodeType {
const endpoint = `/teams/${teamId}/members`;
responseData = await grafanaApiRequest.call(this, 'GET', endpoint);
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
const returnAll = this.getNodeParameter('returnAll', i);
if (!returnAll) {
const limit = this.getNodeParameter('limit', i) as number;
@@ -447,7 +447,7 @@ export class Grafana implements INodeType {
responseData = await grafanaApiRequest.call(this, 'GET', '/org/users');
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
const returnAll = this.getNodeParameter('returnAll', i);
if (!returnAll) {
const limit = this.getNodeParameter('limit', i) as number;