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

@@ -137,7 +137,7 @@ export class Discourse implements INodeType {
}
//https://docs.discourse.org/#tag/Categories/paths/~1categories.json/get
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
const returnAll = this.getNodeParameter('returnAll', i);
responseData = await discourseApiRequest.call(this, 'GET', `/categories.json`, {}, qs);
@@ -197,7 +197,7 @@ export class Discourse implements INodeType {
}
//https://docs.discourse.org/#tag/Groups/paths/~1groups.json/get
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
const returnAll = this.getNodeParameter('returnAll', i);
responseData = await discourseApiRequest.call(this, 'GET', `/groups.json`, {}, qs);
@@ -247,7 +247,7 @@ export class Discourse implements INodeType {
}
//https://docs.discourse.org/#tag/Posts/paths/~1posts.json/get
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
const returnAll = this.getNodeParameter('returnAll', i);
const limit = this.getNodeParameter('limit', i, 0) as number;
responseData = await discourseApiRequest.call(this, 'GET', `/posts.json`, {}, qs);
@@ -370,7 +370,7 @@ export class Discourse implements INodeType {
}
//https://docs.discourse.org/#tag/Users/paths/~1admin~1users~1{id}.json/delete
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
const returnAll = this.getNodeParameter('returnAll', i);
const flag = this.getNodeParameter('flag', i) as boolean;
responseData = await discourseApiRequest.call(