You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
StyleStreams is currently a whitelist of values that combineStyleStreams can transform into CSS rules. Thus, even though combineStyleStreams will pass through streams of standard CSS rules, TypeScript will reject them:
pointerEvents$ does not exist in type "Partial<StyleStreams>"
Fixing this probably involves falling back to csstype, and either removing the $ suffices from stream arguments, or writing a script that generates rule$: Observable<typeof rule> for every rule in csstype.
The text was updated successfully, but these errors were encountered:
combineStyleStreams was using csstype in its internals, which caused a conflict for transformOrigin. I worked around it using Exclude, but that's not until TS2.8, and there are other changes that needs to happen before we can upgrade.
Archiving what I had here:
/** * The types that `combineStyleStreams` can convert to CSS rules. */exporttypePrimitiveStyleDict={opacity: number,translate: Partial<Point2D>,rotate: number,scale: number,transformOrigin: Partial<Point2D>,dimensions: Partial<Dimensions>,};/** * The CSS rules that aren't explicitly handled by `combineStyleStreams`. They * will be passed through unchanged. */exporttypePropertiesFallback={[KinExclude<keyofCSS.Properties,keyofPrimitiveStyleDict>]: CSS.Properties[K]}exporttypeStyleDict=Partial<PrimitiveStyleDict>&PropertiesFallback;
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
StyleStreams
is currently a whitelist of values thatcombineStyleStreams
can transform into CSS rules. Thus, even thoughcombineStyleStreams
will pass through streams of standard CSS rules, TypeScript will reject them:Fixing this probably involves falling back to
csstype
, and either removing the$
suffices from stream arguments, or writing a script that generatesrule$: Observable<typeof rule>
for everyrule
incsstype
.The text was updated successfully, but these errors were encountered: