Failed to solve refence and request confliction in TypeScript