refactor(core): Introduce overload for record-type node parameter (no-changelog) (#4648)

* 📘 Set up overload

* 🔥 Remove inferrable record assertions

* 👕 Fix semicolon

* 👕 Fix another semicolon
This commit is contained in:
Iván Ovejero
2022-11-18 16:29:44 +01:00
committed by GitHub
parent 0565194473
commit 0d9eeea024
202 changed files with 1003 additions and 985 deletions

View File

@@ -135,7 +135,7 @@ export class Bitly implements INodeType {
if (resource === 'link') {
if (operation === 'create') {
const longUrl = this.getNodeParameter('longUrl', i) as string;
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
const additionalFields = this.getNodeParameter('additionalFields', i);
const body: IDataObject = {
long_url: longUrl,
};
@@ -168,7 +168,7 @@ export class Bitly implements INodeType {
}
if (operation === 'update') {
const linkId = this.getNodeParameter('id', i) as string;
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
const updateFields = this.getNodeParameter('updateFields', i);
const body: IDataObject = {};
if (updateFields.longUrl) {
body.long_url = updateFields.longUrl as string;