Hacker News new | past | comments | ask | show | jobs | submit login

I found one other way to use types across modules.

    /* @flow */  
    var Person;  
    type Person = {name: {first: string; last: string;}; isActive: boolean;}  
    module.exports.Person = Person
Just by writing that var you can use the type across modules.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: