#.

10 messages · Page 1 of 1 (latest)

inland python
#

I have no idea what you're trying to do

#

doesn't seem like your Strict type does anything

#

it will always spit out the same type it recieved

ornate narwhal
#

i think they want it to error because "ERR_aaa" is not assignable to Uppercase<string>

#

i don't know zod very well but i think if anything this would be the way to do that:

fierce needleBOT
#
mkantor#0

Preview:```ts
import {z} from "zod"

z.object<Record<Uppercase<string>, string>>({
ERR_aaa: z.string(),
})```

ornate narwhal
gaunt stumpBOT
#
export type ZodRawShape = { [k: string]: ZodTypeAny };
ornate narwhal
#

i guess i really don't know zod very well. i'm not sure if this is exactly what you want, but it does work and maybe helps put you on the right path:

fierce needleBOT
#
mkantor#0

Preview:```ts
import {z} from "zod"

z.object<Record<Uppercase<string>, z.ZodTypeAny>>({
ERR_aaa: z.string(),
})```