Update TypeScript definition

Fixes #282 (part 2).