Closed hirako2000 closed 2 years ago
Good idea! maybe i'll do it this week. I'm really sorry for not responding, I'm gonna dedicate some time now to make yoffee better for users. Are you still using it?
no worries. I'm still using it yes, with types defined locally. intend to do some performance tests at some point but perceived performances is great so far even with frequent changes on large collections.
if you look into providing types, perhaps take a peek at console logging, as the console is getting sent a lot of statements that are just tracing lines about deleted templates when elements get removed.
I'm happy to provide a PR for typings if you would welcome it.
I'm happy to provide a PR for typings if you would welcome it.
Of course, that would be awesome!
perhaps take a peek at console logging, as the console is getting sent a lot of statements that are just tracing lines about deleted templates when elements get removed.
Thanks I really should 🐸
thanks! I will send a PR by the end of this week.
I raised a separate issue for the console statements. #6
It would add a lot of convenience to add a yoffee.d.ts file containing the type definitions of the functions and class exposed by the Yoffee library.
Why?
Our beloved typescript users would feel right at home and not have to declare the yoffee types in their own project to benefit from, out of the box:
Example, here is some naive developer making silly assumptions, despite the official doc being very clear on parameters to pass in, these things happen:
The typescript compiler isn't smart enough to warn/error on the incorrect types passed in for each flavor of creating an element. Of course, with plain javascript it's the same problem, got to wait and see things failing at runtime, but with typescript, granted declaration are provided by in the library module, or added it by the external project, things would look like this:
Highlighting the issues. Along with a nice inline doc:
Type declarations for this library is rather simple to create, Yoffee doesn't have a whole lot of exports, it looks something like this: