Skip to main content

Class: Location

protobuf.SourceCodeInfo.Location

Represents a Location.

Implements

Constructors

constructor

new Location(properties?)

Constructs a new Location.

Parameters

NameTypeDescription
properties?ILocationProperties to set

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

Static create(properties?): Location

Creates a new Location instance using the specified properties.

Parameters

NameTypeDescription
properties?ILocationProperties to set

Returns

Location

Location instance


decode

Static decode(reader, length?): Location

Decodes a Location message from the specified reader or buffer.

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing

Parameters

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

Returns

Location

Location


decodeDelimited

Static decodeDelimited(reader): Location

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

Throws

If the payload is not a reader or valid buffer

Throws

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 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

Static 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

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


getTypeUrl

Static 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

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?IConversionOptionsConversion options

Returns

Object

Plain object