preact-www icon indicating copy to clipboard operation
preact-www copied to clipboard

Add section on signals in typescript

Open saolof opened this issue 2 years ago • 0 comments

The docs on typescript don't seem to mention signals, and it would be nice to know how to type them so that they take on a specific interface type. It's not too difficult to experiment a bit and eventually come up with the pattern of creating a const variable with the right type and using that to initialize the signal, but this should be documented.

saolof avatar Jan 25 '23 18:01 saolof