WebReflection / usignal

A blend of @preact/signals-core and solid-js basic reactivity API
ISC License
220 stars 15 forks source link

Fixed types #4

Closed 38elements closed 2 years ago

38elements commented 2 years ago

There are errors in type definition, since some generics is lacked. Therefore, this added @template JSDoc annotation for adding generics.

coveralls commented 2 years ago

Pull Request Test Coverage Report for Build 3065251925


Totals Coverage Status
Change from base Build 3063344261: 0.0%
Covered Lines: 230
Relevant Lines: 230

💛 - Coveralls
WebReflection commented 2 years ago

Thanks a lot! That's what I was missing indeed 👍

WebReflection commented 2 years ago

@38elements one thing I've gone mental trying to do, but I don't use TS so I am not sure what I am doing, is the ability to define value in Signal as own property (either readonly or regular). The _ as private should somehow represent that value but I can't use value directly as property because it would shadow the accessor. Do you have any hint/clue/idea how to do that? Thanks!

WebReflection commented 2 years ago

Actually, never mind, I think I've manually fixed that through a sed command after buildin gth ets files.

38elements commented 2 years ago

@WebReflection I am sorry for the delay in replying. I missed it. I sent pull request. I think protected _: T; is correct since value property is not exist in Signal class. https://github.com/WebReflection/usignal/pull/5