mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 19:11:13 +00:00
refactor(core): Introduce overload for number-type node parameter (no-changelog) (#4644)
* 📘 Set up overloads * 📘 Add temporary assertion * 🔥 Remove inferrable number assertions * ✏️ Add ticket ref
This commit is contained in:
@@ -207,7 +207,7 @@ export class HomeAssistant implements INodeType {
|
||||
'/services',
|
||||
)) as IDataObject[];
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.slice(0, limit);
|
||||
}
|
||||
} else if (operation === 'call') {
|
||||
@@ -247,7 +247,7 @@ export class HomeAssistant implements INodeType {
|
||||
'/states',
|
||||
)) as IDataObject[];
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.slice(0, limit);
|
||||
}
|
||||
} else if (operation === 'get') {
|
||||
@@ -290,7 +290,7 @@ export class HomeAssistant implements INodeType {
|
||||
'/events',
|
||||
)) as IDataObject[];
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.slice(0, limit);
|
||||
}
|
||||
} else if (operation === 'create') {
|
||||
@@ -385,7 +385,7 @@ export class HomeAssistant implements INodeType {
|
||||
qs,
|
||||
)) as IDataObject[];
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.slice(0, limit);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user