Effect CommunityEC
Effect Community2y ago
12 replies
Jérôme MARTIN

Strange Behavior with Schema.struct Declaration

Hi, I notice the following strange behavior:
declare const basis: string;
/*
Schema.Schema<never, {
    readonly [x: string]: number;
    readonly [x: number]: number;
}>

instead of

Schema.Schema<never, {
    readonly [x: string]: number;
}>

*/
const tryIt = Schema.struct({ [basis]: Schema.number });

I would tend to think this is a bug. But maybe I am wrong?
Was this page helpful?