server js -> ts