[fixed] `_mathOperator` using number literals as return types
ClosedPublic

Authored by appsforartists on Sep 25 2017, 11:48 PM.

Diff Detail

Repository
R13 material-motion/material-motion-js
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Restricted Application added a reviewer: O2: Material Motion. · View Herald TranscriptSep 25 2017, 11:48 PM
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.Sep 25 2017, 11:48 PM
packages/core/src/operators/foundation/_mathOperator.ts
55
Type 'number' cannot be converted to type 'U'.

Incidentally, the type of value is never here.

Restricted Application failed to build Restricted Buildable!Sep 25 2017, 11:51 PM

I think I get function overloads now. The implementation needs to support all the types, but then more specific interfaces can short-circuit the type checking.

Restricted Application failed to build Restricted Buildable!Sep 26 2017, 12:32 AM
featherless accepted this revision.Oct 6 2017, 2:07 PM
This revision is now accepted and ready to land.Oct 6 2017, 2:07 PM
This revision was automatically updated to reflect the committed changes.