update TypeScript; fix error output
fixed #13 by updating TS;add test
fix #12; add test