Skip to content

Symbol#

Represent a symbol in the current file More...

import Script

Properties#

Name
string description
Kind kind
string name
TextRange range
TextRange selectionRange

Methods#

Name
bool isClass()
bool isFunction()
bool select()

Property Documentation#

string description#

Return more detail for this symbol, e.g the signature of a function.

Kind kind#

Return the kind of this symbol. Available symbol kinds are:

  • Symbol.File
  • Symbol.Module
  • Symbol.Namespace
  • Symbol.Package
  • Symbol.Class
  • Symbol.Method
  • Symbol.Property
  • Symbol.Field
  • Symbol.Constructor
  • Symbol.Enum
  • Symbol.Interface
  • Symbol.Function
  • Symbol.Variable
  • Symbol.Constant
  • Symbol.String
  • Symbol.Number
  • Symbol.Boolean
  • Symbol.Array
  • Symbol.Object
  • Symbol.Key
  • Symbol.Null
  • Symbol.EnumMember
  • Symbol.Struct
  • Symbol.Event
  • Symbol.Operator
  • Symbol.TypeParameter

string name#

Return the name of this symbol.

TextRange range#

The range enclosing this symbol not including leading/trailing whitespace but everything else like comments. This information is typically used to determine if the clients cursor is inside the symbol to reveal in the symbol in the UI.

TextRange selectionRange#

The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function. Must be contained by the range.

Method Documentation#

bool isClass()#

Returns whether this Symbol refers to a class or struct.

bool isFunction()#

Returns whether this Symbol refers to a function. This includes constructors and methods

bool select()#

Selects the current symbol.