Ts-toolbelt: O.Writable doesn't work well with generics after update to 3.8.4

Created on 23 Aug 2019  路  3Comments  路  Source: millsp/ts-toolbelt

Since 3.8.4 this got broken, it used to work in 3.8.3

    class Foo {
      readonly s: string = "hi"
    }

    function someFn<F extends Foo>(foo2: F) {
      const wfoo = foo2 as O.Writable<F> // here it complains this is invalid
      wfoo.s = "ho" // here it complains s is not there
    }
bug

Most helpful comment

Thanks to you! Great project you got here :)

All 3 comments

Hey @xaviergonz, thanks for reporting this issue. It's fixed. Sorry for the inconvenience!

Thanks to you! Great project you got here :)

Thanks!

Was this page helpful?
0 / 5 - 0 ratings