AJAX User Registration & Typescript Require