question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The following code works fine on TS 3.4.5:

type Example = {
    eg: string;
};

const exampleDecoder: Decoder<Example> = object({
    eg: string,
});

In TS 4.0.3 however, I got this message:

Type 'Decoder<{ eg?: string; }, unknown>' is not assignable to type 'Decoder<Example, unknown>'.
  Type '{ eg?: string; }' is not assignable to type 'Example'.
    Property 'eg' is optional in type '{ eg?: string; }' but required in type 'Example'.ts(2322)

Any ideas?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
joaomilhocommented, Oct 27, 2020

Yeah, on an empty project it works fine here too. I’ll take a look again and if I find anything I’ll raise a new one. I guess we can close this one for now. Thanks for taking the time!

0reactions
joaomilhocommented, Jul 7, 2021

It’s the strict option.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Best Upgrades To Install | The Sims 4 Guide - YouTube
A guide to the best upgrades around the home that you can install in The Sims 4.Please like and comment, and Subscribe here: ......
Read more >
How do I get upgrade parts in Sims 4? - Quora
Well, there are normally 2 ways that you can get upgrade parts in The Sims 4: repairing broken objects, or simply ordering them...
Read more >
Sims 4 Babies update | When is Better Babies & what will it ...
Announced during The Sims Summit, The Sims 4 Better Babies update is upgrading babies in the life sim so they act more like...
Read more >
Progress on The Sims 4 Households Overhaul Update
Back in August 2021 The Sims Team has first shed the light about their plans for overhauling premade Households in The Sims 4....
Read more >
The Sims™ 4 Digital Deluxe Upgrade on Steam
Upgrade your gameplay experience with The Sims 4 Digital Deluxe Upgrade to receive The Sims 4 Up All Night & Life of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found