If $X$ is an infinite-dimensional manifold (say a Hilbert or a Frechet manifold), and $A \subset X$, we say $A$ has co-dimension strictly larger than $n$ if for all $n$-dimensional manifolds $N$ and smooth maps $f : N \to X$, any neighbourhood $N_f$ of $f$ in the mapping space $Map(N,X)$ has an element $g \in N_f$ such that $g(N) \cap A = \emptyset$. The co-dimension of $A$ in $X$ is $1$ larger than the sup of all $n$ such that the above is true.
Basically, this definition is motivated by the truth of the above statement in the finite-dimensional case -- see a differential topology text like Guillemin and Pollack, or Milnor's "Topology from a Differentiable Viewpoint".