Open oleg-slapdash opened 8 months ago
This code throws an error, while this is a valid typescript code:
const interfaceWithAKnownKey = intersection([ record(string(), any()), object({ foo: string(), }), ]); // Typescript: No ERROR. const test: typeof interfaceWithAKnownKey.TYPE = { foo: "bar", extra: "buzz", }; // StructError: At path: extra -- Expected a value of type `never`, but received: `"buzz"` interfaceWithAKnownKey.mask(test);
This code throws an error, while this is a valid typescript code: