added "declare" before "module" For output file of TypeScript.

Hello.
I have corrected the TypeScript version because it was not working. Please merge if it is good.