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

@@ -164,7 +164,7 @@ export class S3 implements INodeType {
}
//https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
const returnAll = this.getNodeParameter('returnAll', 0);
if (returnAll) {
responseData = await s3ApiRequestSOAPAllItems.call(
this,
@@ -192,7 +192,7 @@ export class S3 implements INodeType {
//https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html
if (operation === 'search') {
const bucketName = this.getNodeParameter('bucketName', i) as string;
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
const returnAll = this.getNodeParameter('returnAll', 0);
const additionalFields = this.getNodeParameter('additionalFields', 0) as IDataObject;
if (additionalFields.prefix) {
@@ -389,7 +389,7 @@ export class S3 implements INodeType {
//https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html
if (operation === 'getAll') {
const bucketName = this.getNodeParameter('bucketName', i) as string;
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
const returnAll = this.getNodeParameter('returnAll', 0);
const options = this.getNodeParameter('options', 0) as IDataObject;
if (options.folderKey) {
@@ -669,7 +669,7 @@ export class S3 implements INodeType {
//https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html
if (operation === 'getAll') {
const bucketName = this.getNodeParameter('bucketName', i) as string;
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
const returnAll = this.getNodeParameter('returnAll', 0);
const options = this.getNodeParameter('options', 0) as IDataObject;
if (options.folderKey) {