Error: Unsupported Key Schema in Record Definition
what is wrong w/ the following?
const TimePeriod = S.Union(
S.transformLiteral("daily", "24h"),
S.transformLiteral("weekly", "7d"),
S.transformLiteral("monthly", "30d"),
S.Literal("lifetime"),
);
const MySchema = S.Record({
key: TimePeriod,
value: S.Record({ key: S.String, value: S.Int.pipe(S.nonNegative()) }),
});const TimePeriod = S.Union(
S.transformLiteral("daily", "24h"),
S.transformLiteral("weekly", "7d"),
S.transformLiteral("monthly", "30d"),
S.Literal("lifetime"),
);
const MySchema = S.Record({
key: TimePeriod,
value: S.Record({ key: S.String, value: S.Int.pipe(S.nonNegative()) }),
});error: Uncaught (in promise) Error: Unsupported key schema
schema (Transformation): ("daily" <-> "24h")error: Uncaught (in promise) Error: Unsupported key schema
schema (Transformation): ("daily" <-> "24h")