website icon indicating copy to clipboard operation
website copied to clipboard

Snippets to add

Open torch2424 opened this issue 5 years ago • 4 comments

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 avatar Oct 15 '20 18:10 torch2424

@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 avatar Oct 15 '20 18:10 saulecabrera

@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!

torch2424 avatar Oct 15 '20 18:10 torch2424

Yeah, that makes total sense! Added an issue here https://github.com/AssemblyScript/website/issues/25

saulecabrera avatar Oct 15 '20 20:10 saulecabrera

Adding another snippet here that I think is worth considering:

  • [ ] Instantiating classes from object literals

saulecabrera avatar Apr 07 '21 19:04 saulecabrera