is an emphatic structure that is regularly seen at the end of sentences, and will imply that the statement before it is shocking, appalling, or unexpected. In English, it translates very similarly as 'to think that (A)' in that it expresses a strong emotional response without expressly saying what that exact response is.
is a combination of the case-marking particle と in its quotation
use, and the adverbial particle
は. In this way, it is just marking the whole statement of (A) as what is being highlighted as the topic, without actually stating anything else about it.
I would have never expected to see you at a place like this! How have you been?
I did not think that I would have been able to buy a house this cheap.
I had no idea that you could run that fast… Why did you keep this from us?
may sometimes be seen following など or similar structures, and in these cases will just imply that 'something like (A)' is what is shocking.
I was not expecting him to fail at something so simple, but it was my fault for leaving it to him.
I had no idea that he was saying such horrible things behind my back…
Although it is common for とは
to come at the end of a sentence with the actual feeling word omitted, the speaker may expressly state their reaction afterwards.