Abstract Types not Working too well (Class). wrong / not allowed implementation? #6136
-
So i'm new to typescript and Svelte(kit). I've been experimenting with Classes and Interfaces. I've been mainly refactoring some bits and pieces to of the SvelteKit Demo App to use class and interfaces instead of Just Types to Accomplish some OOP stuff, like having methods to conveniently transform / get / set data in an object. Here's what i've been doing. Transforming the data.todos to Todo instances in order to use the object methods It works. But not smoothly. I have to hit refresh on the browser to see changes reflected.. So my question is, Is this implementation valid? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think the only missing Part is to make |
Beta Was this translation helpful? Give feedback.
I think the only missing Part is to make
const todos = data.todos.map...
a reactive statement:$: todos = data.todos.map...