Help prepare for 2025 → Answer 8 simple questions on our Fall Survey
Open Survey
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