when and under what circumstances is posting pseudo-code in a question acceptable, if at all?
Can your question be minimally and completely expressed using only pseudo-code? Can it be [adequately answered using only pseudo-code][1]adequately answered using only pseudo-code? If the answer to both of those questions is "yes", then there is no problem using pseudo-code for your question.
There is no reason to arbitrarily impose a specific language requirement on a question that does not inherently have a language requirement. Stack Overflow's charter is "to build a library of detailed answers to every question about programming". Nothing about that restricts questions only to those that are expressed using some specific programming language.
In addition, it is of course fine to use pseudo-code to elaborate on a question. Even if there's a need to provide code in a real programming language, pseudo-code can in some cases illuminate the question in ways that the code alone may not, or at least may not as clearly. If the question would be fine without the pseudo-code that's included, then the inclusion of pseudo-code obviously does not in and of itself harm the question.
Which is not to say that pseudo-code is always sufficient. It's up to you as the questioner to make sure your question otherwise [meets the standards for the site][2]meets the standards for the site. Many questions that rely heavily or solely on pseudo-code do not. So, make sure that if your question is poorly received, you are not confusing complaints about the use of pseudo-code with complaints about the content itself, where the use of pseudo-code is just a symptom of a bigger problem. See related discussions in e.g. [What's the appropriate new/current close reason for “How do I do X?”][3] and [Why is this question unclear instead ofWhat's the appropriate new/current close reason for “How do I do X?” and too broad?][4]Why is this question unclear instead of too broad? (these are not about pseudo-code per se, but do include discussion of the effect pseudo-code has on the quality of a question).
So, what about your specific question? You seem to summarize your question thus:
I've had a look through the TypeScript and Angular documentation and done a few searches and I can't find the correct syntax for this
Pseudo-code and syntax are mutually exclusive. Syntax describes the exact structure of the code. It's meaningless without the context of a known grammar. Pseudo-code by definition has no defined grammar, and beyond that your question appears to be asking in the context of the language TypeScript. As such, your pseudo-code doesn't inform readers in any way about your attempts to solve your problem, nor to help readers understand what your specific difficulty might be.
As such, the question comes across as not showing evidence of research (which should garner down-votes), and as being too broad (which should garner close-votes). At the very least, it's not at all clear what value it is you were hoping the pseudo-code would add to the question. A real TypeScript code example, even one that doesn't compile, would have been far more useful. [1]: Pseudo-code answers only [2]: https://stackoverflow.com/help/asking [3]: What's the appropriate new/current close reason for "How do I do X?" [4]: Why is this question *unclear* instead of *too broad*?