Type check object literals declared before typed function call

This code can now type check object literals that are declared before the function call, often because they are large enough to make a function call look messy.