Skip to main content

Class: Location

protobuf.SourceCodeInfo.Location

Represents a Location.

Implements

Constructors

constructor

new Location(properties?): Location

Constructs a new Location.

Parameters

NameTypeDescription
properties?ILocationProperties to set

Returns

Location

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


create

create(properties?): Location

Creates a new Location instance using the specified properties.

Parameters

NameTypeDescription
properties?ILocationProperties to set

Returns

Location

Location instance


decode

decode(reader, length?): Location

Decodes a Location message from the specified reader or buffer.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage length if known beforehand

Returns

Location

Location

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): Location

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

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

Location

Location

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


encode

encode(message, writer?): Writer

Encodes the specified Location message. Does not implicitly google.protobuf.SourceCodeInfo.Location.verify|verify messages.

Parameters

NameTypeDescription
messageILocationLocation message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

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

Parameters

NameTypeDescription
messageILocationLocation message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

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


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for Location

Parameters

NameTypeDescription
typeUrlPrefix?stringyour custom typeUrlPrefix(default "type.googleapis.com")

Returns

string

The default type url


toObject

toObject(message, options?): Object

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

Parameters

NameTypeDescription
messageLocationLocation
options?IConversionOptionsConversion options

Returns

Object

Plain object