Slightly clean up resolution code.
Slightly clean up resolution code.

popravich/typescript,hippich/typescript,mbebenita/shumway.ts,mbrowne/typescript-dci,fdecampredon/jsx-typescript-old-version,mbrowne/typescript-dci,mbrowne/typescript-dci,popravich/typescript,hippich/typescript,fdecampredon/jsx-typescript-old-version,fdecampredon/jsx-typescript-old-version,mbrowne/typescript-dci,popravich/typescript,mbebenita/shumway.ts,hippich/typescript,mbebenita/shumway.ts