Understanding `Context.Tag` Constructor

One Question about this piece of code from the docs:

import { Effect, Context } from "effect"
 
export class Random extends Context.Tag("Random")<
  Random,
  { readonly next: Effect.Effect<number> }
>() {}


Is the whole class Random construct »only used« to create some sort of Symbol - which exists at runtime - that can be referenced right after as it's type? I mean, the class body is empty and new Random() is never called, at least in the docs.

Would that be in any way semantically different than this:
type Time = symbol;
const Time = Context.Tag('Time')<Time, { now: Effect.Effect<number> }>()

??
Was this page helpful?