improve the TypeScript definition and sync with the abbreviated version in the README