diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-12-14 19:00:24 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-12-14 19:00:24 +0100 |
commit | 47b2b841357dd723be0144ff4ae9eab51bba37a0 (patch) | |
tree | 86d6a8a936eef45dd6c4a68e9cf55383cf5dddb8 /src/util | |
parent | a4a9b16153428953cb882f2d6037c3bcec68ee17 (diff) |
better type errors
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/codec.ts | 2 |
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>> { |