Preview 2.0 is now in Public Beta!
Read the Announcement
Note: You are on the beta version of our docs. This is a work in progress and may contain broken links and pages.
Source
A class encapsulating information for source code origin.

Summary

Constructors

constructor

Properties

column
line
uri

Methods

get
set

Constructors

constructor

new Source(uri: string, line: number, column: number): Source
Creates a new Source instance by given uri, line and column.
Parameter Default Description
uri
string

line
number

column
number

Returns Source

Properties

column

column: number
Gets the position in the source document.

line

line: number
Gets the line in the source document.

uri

uri: string
Gets the URI of the source document;

Methods

get

Static
get(object: any): Source
Get the source of an object.
Parameter Default Description
object
any

Returns Source

set

Static
set(object: any, src: Source): any
Set the source of an object.
Parameter Default Description
object
any

src

Returns any