Hey there,
for my use case it would be nice, if the yaml could be imported "as const" so that typescript would make literal types e.g.
import test from "./test.yaml";
// currently:
typeof test // -> { test: { one: string, two: string } }
// as const
typeof test // -> { test: { one: "one", two: "two" } }
this would be beneficial to mapped types since we can then narrow the inference:
type Keys = keyof typeof test['test']; // is "one" | "two"
type Values = typeof test['test'][Keys]; // is string but could be "one" | "two"
Hey there,
for my use case it would be nice, if the yaml could be imported "as const" so that typescript would make literal types e.g.
this would be beneficial to mapped types since we can then narrow the inference: