Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deno/cli/tsc/dts/lib.deno.unstable.d.ts>Temporal.RoundTo

A modern runtime for JavaScript and TypeScript.
Latest
type alias Temporal.RoundTo
import { type Temporal } from "https://deno.land/x/deno@v1.41.0/cli/tsc/dts/lib.deno.unstable.d.ts";
const { RoundTo } = Temporal;

round methods take one required parameter. If a string is provided, the resulting Temporal.Duration object will be rounded to that unit. If an object is provided, its smallestUnit property is required while other properties are optional. A string is treated the same as an object whose smallestUnit property value is that string.

definition: SmallestUnit<T> | { smallestUnit: SmallestUnit<T>; roundingIncrement?: number; roundingMode?: RoundingMode; }