Snippets to add
This is my personal TODO list of Snippets I would like to see added to the snippets page for AssemblyScript. Creating an issue here just in case someone else is looking to help with the docs :smile: :tada:
- [ ] https://github.com/AssemblyScript/assemblyscript/blob/master/tests/compiler/scoped.ts
- [ ] https://github.com/AssemblyScript/assemblyscript/blob/master/tests/compiler/instanceof.ts
- [ ] https://github.com/AssemblyScript/assemblyscript/blob/master/tests/compiler/inlining.ts
- [ ] https://github.com/AssemblyScript/assemblyscript/blob/master/tests/compiler/getter-call.ts
- [ ] https://github.com/AssemblyScript/assemblyscript/blob/master/tests/compiler/class-extends.ts
- [ ] https://github.com/AssemblyScript/assemblyscript/blob/master/tests/compiler/class.ts
- [ ] https://github.com/AssemblyScript/assemblyscript/blob/master/tests/compiler/call-super.ts
- [ ] https://github.com/AssemblyScript/assemblyscript/blob/master/tests/compiler/call-optional.ts
- [ ] https://github.com/AssemblyScript/assemblyscript/blob/master/tests/compiler/enum.ts
- [ ] Embedding Assets at compile time with memory.data
- [ ] Function types for passing around functions and callbacks
- [ ] Null checking
- [ ] Retain release, alloc and free. (Pointers)
- [ ] Double Equals vs. Triple Equals
@torch2424 Would it make sense to add to that list the usage of asconfig.json? I think this is not listed in the documentation or I'm not able to find it 😄 There are some nice examples here https://github.com/AssemblyScript/assemblyscript/tree/master/tests/asconfig (if I'm not wrong this was added by @jtenner)
@saulecabrera Oh yeah! We definitely need some docs on asconfig :smile:
I think since it's more of a build / CLI thing, we should probably just make a normal docs page for it. As snippets is more for copy pasting code in my opinion :smile:
But thank you very much for bringing it up! :smile: If you have the time, I'm sure a PR for asconfig would be much appreciated!
Yeah, that makes total sense! Added an issue here https://github.com/AssemblyScript/website/issues/25
Adding another snippet here that I think is worth considering:
- [ ] Instantiating classes from object literals