type.lua 457 B

12345678910111213141516171819202122
  1. return {
  2. summary = 'Get the type name of the object.',
  3. description = 'Returns the name of the object\'s type as a string.',
  4. arguments = {},
  5. returns = {
  6. type = {
  7. type = 'string',
  8. description = 'The type of the object.'
  9. }
  10. },
  11. variants = {
  12. {
  13. arguments = {},
  14. returns = { 'type' }
  15. }
  16. },
  17. example = [[
  18. function isTexture(obj)
  19. return type(obj) == 'userdata' and obj:type() == 'Texture'
  20. end
  21. ]]
  22. }