Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

TypeScript will use flow typing to determine the type as number[] in this code:

    const x = []
    x.push(1)
    type t = typeof x // number[]


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

Search: