Thank you for the tutorial. I always used prebuilt queue systems like Amazon's SQS but I find it very interesting to understand how these systems work internally.
Can you explain this line?
const queryData = (url.parse(req.url, true).query) as unknown as Incoming;
url is not defined (I thought that maybe you wanted to use the 'URL' class but the parse method doesn't exist). Also I don't really understand the notation "as unknown as Incoming"
As for the unknown...unknown is a type that can be assigned to something without type assertion...it's like saying I don't care what is it but I I want to assume is is Incoming
Thank you for the tutorial. I always used prebuilt queue systems like Amazon's SQS but I find it very interesting to understand how these systems work internally.
Can you explain this line?
const queryData = (url.parse(req.url, true).query) as unknown as Incoming;
url is not defined (I thought that maybe you wanted to use the 'URL' class but the parse method doesn't exist). Also I don't really understand the notation "as unknown as Incoming"
Thanks
Sorry I didn't include the imports to save space. url is the node url module
import * as url from 'url';
I do have the code in a GitHub repo but I am not entirely sure it's identical
github.com/elasticrash/dpp-queue
As for the
unknown
...unknown
is a type that can be assigned to something without type assertion...it's like saying I don't care what is it but I I want to assume is isIncoming
Many thanks, now is much more clear :)