What is the meaning of とは?

indicates that a word or a phrase is to be defined or explained

Synonym of (to, with)

Short for とは思わなかった (to wa omowanakatta, did not think that ...).

Source: wiktionary.org