typescripts for client and server