better type errors

This commit is contained in:
Florian Dold 2019-12-14 19:00:24 +01:00
parent a4a9b16153
commit 47b2b84135
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -80,7 +80,7 @@ class ObjectCodecBuilder<T, TC> {
/**
* Define a property for the object.
*/
property<K extends keyof T & string, V>(
property<K extends keyof T & string, V extends T[K]>(
x: K,
codec: Codec<V>,
): ObjectCodecBuilder<T, TC & SingletonRecord<K, V>> {