aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-12-14 19:00:24 +0100
committerFlorian Dold <florian.dold@gmail.com>2019-12-14 19:00:24 +0100
commit47b2b841357dd723be0144ff4ae9eab51bba37a0 (patch)
tree86d6a8a936eef45dd6c4a68e9cf55383cf5dddb8
parenta4a9b16153428953cb882f2d6037c3bcec68ee17 (diff)
better type errors
-rw-r--r--src/util/codec.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/codec.ts b/src/util/codec.ts
index 9f4dc295f..7dcf493a2 100644
--- a/src/util/codec.ts
+++ b/src/util/codec.ts
@@ -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>> {