# Type Declarations

**URL:** https://forum.makecode.com/t/type-declarations/4594
**Category:** micro:bit
**Created:** [November 23, 2020, 11:34pm UTC](https://forum.makecode.com/t/type-declarations/4594 "2020-11-23T23:34:22Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![tncbbthositg](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/tncbbthositg/32/2288_2.png) [@tncbbthositg](https://forum.makecode.com/u/tncbbthositg)
#### Post date: [November 23, 2020, 11:34pm UTC](https://forum.makecode.com/t/type-declarations/4594/1 "2020-11-23T23:34:22Z")

</div>

Where’s a good place to get the micro:bit specific type declarations? I’ve built some pxt extensions for some yahboom peripherals, but it’s kind of annoying for `pins`, `DigitalPin`, `PulseValue`, `control`, etc. to be undefined. It’d be great to get auto-completion. It’d also be cool if I could get a neopixel type declaration too.

Thanks!!!

---

<div class="post-metadata">

### Author: ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)
#### Post date: [November 24, 2020, 2:29am UTC](https://forum.makecode.com/t/type-declarations/4594/2 "2020-11-24T02:29:09Z")

</div>

Are you talking about testing them out? I think you can use [arcade.makecode.com/playground](http://arcade.makecode.com/playground) or something. I tried it out and it doesn’t work. I forgot what the link is but I hope it helps. @jwunderl, you know where it is right?

---

<div class="post-metadata">

### Author: ![jwunderl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jwunderl/32/5308_2.png) [@jwunderl](https://forum.makecode.com/u/jwunderl)
#### Post date: [November 24, 2020, 3:50am UTC](https://forum.makecode.com/t/type-declarations/4594/3 "2020-11-24T03:50:26Z")

</div>

That site is [https://makecode.com/playground](https://makecode.com/playground) (no arcade in front of it) 🙂

In this case, though, we’d probably want something else - that site is good for building blocks, but it doesn’t have the same autocomplete / etc to get everything working as expected.

In this case, are you planning on making extensions in typescript, or will they require cpp as well? If its just ts (or mostly ts), I would suggest trying out the github integration: [https://makecode.com/extensions/github-authoring](https://makecode.com/extensions/github-authoring) . Otherwise, I’d have to check if we have anything better - I don’t change the c++ _that_ often, so when I do I’ve just worked with it having a few types mistaken. If I remember right the cli steps here might help a bit: [https://makecode.com/extensions/getting-started/vscode](https://makecode.com/extensions/getting-started/vscode)

---

<div class="post-metadata">

### Author: ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)
#### Post date: [November 24, 2020, 1:10pm UTC](https://forum.makecode.com/t/type-declarations/4594/4 "2020-11-24T13:10:19Z")

</div>

OOOOOOOOOH… No arcade in it. Got it. Ie been looking for the makecode playground so I can actually test some of my ideas out

---

<div class="post-metadata">

### Author: ![tncbbthositg](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/tncbbthositg/32/2288_2.png) [@tncbbthositg](https://forum.makecode.com/u/tncbbthositg)
#### Post date: [November 24, 2020, 2:24pm UTC](https://forum.makecode.com/t/type-declarations/4594/5 "2020-11-24T14:24:24Z")

</div>

Thanks for getting back to me (you too @Dreadmask197).

Playground is going to be super handy. It’s funny, I ran across it but never connected that I could be doing the designing in playground. Probably because I spend so much time in vscode that it didn’t feel like a web-editor would suffice. 🤦‍♂️

I did try the getting-started guide with vscode but ran into a snag with `pxt` ([Getting started with a pxt extension for micro:bit](https://forum.makecode.com/t/getting-started-with-a-pxt-extension-for-micro-bit/4353/3)). I was digging through the dependencies looking for which one had a typo in the package.json but decided I could just as easily manually define the pxt config files (which I did and moved on).

But, it was frustrating not having the types in vscode which would probably be addressed if pxt would’ve worked. I’ll bet I just need to reference [https://www.npmjs.com/package/pxt-microbit](https://www.npmjs.com/package/pxt-microbit) and I may just need to point to some of the definition files in my tsconfig. I’ll go give that a shot and then report back here . . . for posterity. 🙂

---

<div class="post-metadata">

### Author: ![tncbbthositg](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/tncbbthositg/32/2288_2.png) [@tncbbthositg](https://forum.makecode.com/u/tncbbthositg)
#### Post date: [November 24, 2020, 3:00pm UTC](https://forum.makecode.com/t/type-declarations/4594/6 "2020-11-24T15:00:02Z")

</div>

OK. It looks like this is a non-trivial effort. These projects don’t seem to emit type declarations. ☹

I’ll try to come up with something later. I may just clone the repos, emit the type declarations, and add them to definitely typed or something.

---

<div class="post-metadata">

### Author: ![peli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/peli/32/12_2.png) [@peli](https://forum.makecode.com/u/peli)
#### Post date: [November 25, 2020, 5:02am UTC](https://forum.makecode.com/t/type-declarations/4594/7 "2020-11-25T05:02:54Z")

</div>

For in /localtypings for .d.ts files for pxt, in particular pxtpackage.d.ts
