News for hackers. Stuff that matters.
Re:Create React App 2.0: Babel 7, Sass, and More by ng12 on Tuesday October 02, 2018 @01:07PM (#18123553)
Not true, most of that can be done with TypeScript. $Values might be the only one missing.
Re:Create React App 2.0: Babel 7, Sass, and More by WorldMaker on Tuesday October 02, 2018 @01:22PM (#18123686)
$Values should be possible with Typescript 3.0+ conditional infer types, presumably something very similar to the built-in ReturnType<T> conditional infer type.

Untested and off the top my head but maybe something like:

    type Values<T> = T extends { [K keyof T]: infer R } ? R : any
Re:Create React App 2.0: Babel 7, Sass, and More by wyze on Tuesday October 02, 2018 @01:34PM (#18123821)
It works, just need to add `in` in-between `K` and `keyof`.
Re:Create React App 2.0: Babel 7, Sass, and More by wyze on Tuesday October 02, 2018 @01:31PM (#18123788)
Looks like $Values can be written as follows in TypeScript:

    type Props = {
      age: number
      name: number
    }

    type Values = Props[keyof Props]