Observables of topological Yang-Mills theory were defined by Witten as the classes of an equivariant cohomology. We propose to define them alternatively as the BRST cohomology classes of a superspace version of the theory, where BRST invariance is associated to super Yang-Mills invariance. We provide and discuss the general solution of this cohomology.