@marimo-team/islands 0.22.1-dev3 → 0.22.1-dev6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/utils/time.ts CHANGED
@@ -1,8 +1,10 @@
1
1
  /* Copyright 2026 Marimo. All rights reserved. */
2
2
 
3
- export type Milliseconds = number & { __type__: "milliseconds" };
3
+ import type { TypedNumber } from "./typed";
4
4
 
5
- export type Seconds = number & { __type__: "seconds" };
5
+ export type Milliseconds = TypedNumber<"milliseconds">;
6
+
7
+ export type Seconds = TypedNumber<"seconds">;
6
8
 
7
9
  export class Time {
8
10
  private readonly ms: Milliseconds;
@@ -5,13 +5,13 @@
5
5
  * This is a compile-time type only and does not exist at runtime.
6
6
  * It is used to distinguish between different types of numbers.
7
7
  */
8
- export type TypedNumber<T> = number & { __type__: T };
8
+ export type TypedNumber<T> = number & { __brand: T };
9
9
 
10
10
  /**
11
11
  * A typed string.
12
12
  * This is a compile-time type only and does not exist at runtime.
13
13
  * It is used to distinguish between different types of strings.
14
14
  */
15
- export type TypedString<T> = string & { __type__: T };
15
+ export type TypedString<T> = string & { __brand: T };
16
16
 
17
17
  export type Identified<T> = { id: string } & T;