• Changed Files
  • packages/core/src/operators/pluck.ts

[added] types to pluck(path)
Changes PlannedPublic

Authored by appsforartists on Fri, Mar 31, 1:59 AM.

Details

Summary

Attempting to add types to pluck() after chat with TypeScript PM @DanielRosenwasser.

Here's the same attempt in a TS playground.

It doesn't seem to be working. For instance, this code:

const stream$ = undefined as MotionObservable<Point2D>;
stream$.pluck('x')._map(value => value.toFixed());

results in "toFixed does not exist on type Pick<Point2D, 'x'>", even though x is a number on Point2D.

Diff Detail

Repository
R13 material-motion/material-motion-js
Lint
Lint OK
Unit
No Unit Test Coverage
appsforartists created this revision.Fri, Mar 31, 1:59 AM
Restricted Application completed building Restricted Buildable.Fri, Mar 31, 1:59 AM
Restricted Application added a reviewer: O2: Material Motion. · View Herald TranscriptFri, Mar 31, 1:59 AM
Restricted Application added a project: Material Motion. · View Herald Transcript
Restricted Application added a reviewer: O3: Material JavaScript platform reviewers. · View Herald Transcript
Restricted Application added a reviewer: Material Motion. · View Herald Transcript
appsforartists planned changes to this revision.Fri, Mar 31, 1:59 AM
Restricted Application failed to build Restricted Buildable!Fri, Mar 31, 2:02 AM
appsforartists edited the summary of this revision. (Show Details)Fri, Mar 31, 2:04 AM
Restricted Application completed building Restricted Buildable.Fri, Mar 31, 3:07 AM
appsforartists planned changes to this revision.Fri, Mar 31, 3:07 AM
Restricted Application failed to build Restricted Buildable!Fri, Mar 31, 3:10 AM

Moving to own file

Restricted Application failed to build Restricted Buildable!Mon, Apr 10, 5:07 PM
appsforartists planned changes to this revision.Mon, Apr 10, 5:21 PM