あんなことを

that kind of thing

→ あんな
phrase Uncommon #18,876
that kind of thing を marks it as the object of an action and is usually not translated into English.
JA: あんなことを言わないでください。
EN: Please don't say that kind of thing.

あんなことをするなんて頭がどうかしている。

You must be out of your mind to do something like that.

あんなことを言うとは君も勇気があるな。

You’re pretty brave to say something like that.

なんでトムさんはあんなことをしたのでしょう。

I wonder why Tom did such a thing.

なぜ私はあんなことをしたのか。

Why did I do such a thing?

あんなことを人に言われたのは初めてだ。

That's the first time anyone's ever said something like that to me.

社長にあんなことを言ったからには僕はくびになるのは確実だ。

Now that I’ve said something like that to the president, I’m sure to get fired.

トムさんはあんなことをいったはずがないと思います。

I don't think Tom could have said such a thing.