Hacker News new | ask | show | jobs
by Spiritus 4467 days ago
I've never actually used TypeScript until today, but just the tutorial code takes forever to compile, this snippet took 2 seconds for example, whaaat??

    interface Person {
        firstname: string;
        lastname: string;
    }

    function greeter(person: Person) {
        return 'Hello, ' + person.firstname + ' ' + person.lastname;
    }

    var user = {firstname: 'John', lastname: 'Doe'}

    document.body.innerHTML = greeter(user);
It's a shame really, because it looks like a really cool project.
1 comments

It seems there is a minimum time of 2 seconsd to compile anything because even a simple console.log('Hello'); one-liner also takes 2 seconds.