Fixed TypeScript defs on lines 1741-1748 (thanks wombatbuddy)