Skip to main content

Class: Location

protobuf.SourceCodeInfo.Location

Represents a Location.

Implements#

Constructors#

constructor#

new Location(properties?)

Constructs a new Location.

Parameters#

NameType
properties?ILocation

Properties#

leadingComments#

leadingComments: string

Location leadingComments.

Implementation of#

ILocation.leadingComments


leadingDetachedComments#

leadingDetachedComments: string[]

Location leadingDetachedComments.

Implementation of#

ILocation.leadingDetachedComments


path#

path: number[]

Location path.

Implementation of#

ILocation.path


span#

span: number[]

Location span.

Implementation of#

ILocation.span


trailingComments#

trailingComments: string

Location trailingComments.

Implementation of#

ILocation.trailingComments

Methods#

toJSON#

toJSON(): Object

Converts this Location to JSON.

Returns#

Object

JSON object


decode#

Static decode(reader, length?): Location

Decodes a Location message from the specified reader or buffer.

throws {Error} If the payload is not a reader or valid buffer

throws {$protobuf.util.ProtocolError} If required fields are missing

Parameters#

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?number-

Returns#

Location

Location


decodeDelimited#

Static decodeDelimited(reader): Location

Decodes a Location message from the specified reader or buffer, length delimited.

throws {Error} If the payload is not a reader or valid buffer

throws {$protobuf.util.ProtocolError} If required fields are missing

Parameters#

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns#

Location

Location


encode#

Static encode(message, writer?): Writer

Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages.

Parameters#

NameTypeDescription
messageILocationLocation message or plain object to encode
writer?Writer-

Returns#

Writer

Writer


encodeDelimited#

Static encodeDelimited(message, writer?): Writer

Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages.

Parameters#

NameTypeDescription
messageILocationLocation message or plain object to encode
writer?Writer-

Returns#

Writer

Writer


fromObject#

Static fromObject(object): Location

Creates a Location message from a plain object. Also converts values to their respective internal types.

Parameters#

NameTypeDescription
objectObjectPlain object

Returns#

Location

Location


toObject#

Static toObject(message, options?): Object

Creates a plain object from a Location message. Also converts values to other types if specified.

Parameters#

NameTypeDescription
messageLocationLocation
options?IConversionOptions-

Returns#

Object

Plain object