Skip to content

Conversation

@stc1988
Copy link
Contributor

@stc1988 stc1988 commented Dec 21, 2025

No description provided.

@phoddie
Copy link
Collaborator

phoddie commented Dec 22, 2025

Thank you for preparing these type definitions. They are well done.

I noticed two small details.

First, the Neopixels constructor uses optios instead of options.

Second, the Neopixels instance is also a host buffer. This allows for script optimizations. The details are explained in NeoPixels, Moddable style in the section "Direct pixel access in JavaScript."

let pixels = new Uint32Array(np);
pixels[0] = white;
pixels[1] = ~pixels[0];

I think you just need to change the Neopixels type to extend HostBuffer from xs.d.ts. But, if that gets complicated, you could skip it for now.

@stc1988
Copy link
Contributor Author

stc1988 commented Dec 23, 2025

Thank you for reviewing in detail. I’ve made the corrections based on your comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants