From 5946a4f0353533e5bc0cc5a7887d2976c888914f Mon Sep 17 00:00:00 2001 From: Brenton Simpson Date: Mon, 26 Nov 2018 11:08:11 -0800 Subject: [PATCH] [fixed] type on transformOrigin in combineStyleStreams internals Summary: There's a bunch more work to be done on the types here (#250), but this gets us building cleanly. Reviewers: O2 Material Motion, O3 Material JavaScript platform reviewers, #material_motion Tags: #material_motion Differential Revision: http://codereview.cc/D3469 --- packages/views-dom/src/combineStyleStreams.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/views-dom/src/combineStyleStreams.ts b/packages/views-dom/src/combineStyleStreams.ts index 49239f76..b8c3d96d 100644 --- a/packages/views-dom/src/combineStyleStreams.ts +++ b/packages/views-dom/src/combineStyleStreams.ts @@ -34,8 +34,18 @@ export type PrimitiveStyleDict = Partial<{ scale: number, transformOrigin: Partial, dimensions: Partial, -}> & CSS.Properties; + // Explicitly pass through the styles that `combineStyleStreams` needs. + // + // Can't `& CSS.Properties` because that causes conflicts for the shape of + // `transformOrigin`. See #250. + borderRadius: CSS.Properties['borderRadius'], + willChange: CSS.Properties['willChange'], + width: CSS.Properties['width'], + height: CSS.Properties['height'], +}>; + +// TODO(#250): Merge StyleStreams and csstype export function combineStyleStreams(styleStreams: Partial): ObservableWithMotionOperators { return combineLatest>( stripStreamSuffices(styleStreams as StyleStreams) as MaybeReactive,