0

typescript code looks wrong

arwtyxouymz 5 lat temu 0

Hi! Thank you for your great stuff!!

I'm learning design pattern in your web site.

I found the bug of your typescript code in your Observer page.

In your code, Subject interface does not have state property.

But two concrete observers use state property unless their update methods' argument is type of Subject interface.

I think you modify Subject interface to have state property.

I'm sorry if I was wrong because I'm a beginner of typescript.