Reference
moveTimeToMs
Converts a MoveTime to milliseconds: moveTimeToMs('0.08s') === 80, moveTimeToMs(80) === 80.
Overview
Converts a MoveTime to milliseconds: moveTimeToMs('0.08s') === 80,
moveTimeToMs(80) === 80. Returns NaN (and warns in dev mode) for a string that is not a time,
which is only reachable by bypassing the type.
Useful when application code needs the resolved number — for example to schedule work after an animation whose duration came from configuration.
Stable API — covered by semantic-versioning guarantees.
- Kind: Function
- Stability:
stable
Signature
function moveTimeToMs(value: MoveTime): number
| Parameter | Type | Optional | Description |
|---|---|---|---|
value |
MoveTime |
Returns number