Can I just type it in my IDE or text editor instead of telling you what to write?

No. We do the interview in a pair programming style in order to get a sense of your ability to communicate.

We do the interview in a pair programming style in order to get a sense of your ability to communicate (and your linguistic abilities in English, if applicable) - so telling the interviewer what to write is an important part of the assessment.