Typescript error runtime error: Cannot read property 'prototype' of undefined when extending Typescript error runtime error: Cannot read property 'prototype' of undefined when extending typescript typescript