Delay typespec compilation to after expansion
Merge pull request #2424 from ericmj/delay-typespecs

Delay typespec compilation to after expansion