Skip to content

Class methods vs fields with function values #3234

Answered by tomlau10
TracerDS asked this question in Q&A
Discussion options

You must be logged in to vote

I cannot remove the ---@field lines as without them I dont even have intellisense in the first place (for the class methods)

  • If you added the @class correctly on the table that defines your methods, you don't need @field at the beginning.
  • If you dont have intellisense after adding @class and removing @field, then I believe you added the @class incorrectly.
  • And since @field takes higher priority, if at the same time you have @field GetName fun():..., then even if you add @class correctly on the methods table, you will still see GetName as a field but not method.

I tried ur minimal example, sadly the same thing happens.

I wonder if you just put my minimal example into your existing wo…

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@TracerDS
Comment options

@tomlau10
Comment options

@TracerDS
Comment options

@tomlau10
Comment options

Answer selected by TracerDS
@TracerDS
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants