This might be a stupid question. I see a lot of somethingApiCall()
methods in all the nodes, and all of them take an IDataObject
type as - for example - query string parameter.
Now as far as I can see this is just an ordinary object with keys limited to strings, right? (ref TS docs).
now I have two questions:
- am I right? And is the limitation “just” to be sure to always have string keys?
- If (!) I’m right, I think I understand why the following snippet does not work, but I don’t know how to make it work … . any help appreciated
const qs: IDataObject = (httpMethod == 'GET')
? this.getNodeParameter('queryOptions', 0) as object
: {};
# error message:
# Type 'object' is not assignable to type 'IDataObject'.
# Index signature is missing in type '{}'.
thanks in advance! Axel.