> I need a typescript function which takes in an object with an id string property and a string message property, and also takes an array of search strings, and returns a mapping of search strings to matching message ids
Your prompt is wrong. You want a function that takes an array of id/message objects, not an object.
It's quite impressive that GPT is just able to correct for that. As a human, I would first ask what you actually mean, because your prompt appears to be unclear.
Your prompt is wrong. You want a function that takes an array of id/message objects, not an object.
It's quite impressive that GPT is just able to correct for that. As a human, I would first ask what you actually mean, because your prompt appears to be unclear.