> ## Documentation Index
> Fetch the complete documentation index at: https://baileys.wiki/llms.txt
> Use this file to discover all available pages before exploring further.

# Favorite

> Protobuf class Favorite generated from WAProto.

Defined in: [WAProto/index.d.ts:12016](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L12016)

## Implements

* [`IFavorite`](/proto-reference/SyncActionValue/FavoritesAction/interfaces/IFavorite)

## Constructors

### new Favorite()

> **new Favorite**(`p`?): [`Favorite`](/proto-reference/SyncActionValue/FavoritesAction/classes/Favorite)

Defined in: [WAProto/index.d.ts:12017](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L12017)

#### Parameters

##### p?

[`IFavorite`](/proto-reference/SyncActionValue/FavoritesAction/interfaces/IFavorite)

#### Returns

[`Favorite`](/proto-reference/SyncActionValue/FavoritesAction/classes/Favorite)

## Properties

### id?

> `optional` **id**: `null` | `string`

Defined in: [WAProto/index.d.ts:12018](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L12018)

#### Implementation of

[`IFavorite`](/proto-reference/SyncActionValue/FavoritesAction/interfaces/IFavorite).[`id`](/proto-reference/SyncActionValue/FavoritesAction/interfaces/IFavorite#id)

## Methods

### create()

> `static` **create**(`properties`?): [`Favorite`](/proto-reference/SyncActionValue/FavoritesAction/classes/Favorite)

Defined in: [WAProto/index.d.ts:12019](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L12019)

#### Parameters

##### properties?

[`IFavorite`](/proto-reference/SyncActionValue/FavoritesAction/interfaces/IFavorite)

#### Returns

[`Favorite`](/proto-reference/SyncActionValue/FavoritesAction/classes/Favorite)

***

### decode()

> `static` **decode**(`r`, `l`?): [`Favorite`](/proto-reference/SyncActionValue/FavoritesAction/classes/Favorite)

Defined in: [WAProto/index.d.ts:12021](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L12021)

#### Parameters

##### r

`Uint8Array`\<`ArrayBufferLike`> | `Reader`

##### l?

`number`

#### Returns

[`Favorite`](/proto-reference/SyncActionValue/FavoritesAction/classes/Favorite)

***

### encode()

> `static` **encode**(`m`, `w`?): `Writer`

Defined in: [WAProto/index.d.ts:12020](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L12020)

#### Parameters

##### m

[`IFavorite`](/proto-reference/SyncActionValue/FavoritesAction/interfaces/IFavorite)

##### w?

`Writer`

#### Returns

`Writer`

***

### fromObject()

> `static` **fromObject**(`d`): [`Favorite`](/proto-reference/SyncActionValue/FavoritesAction/classes/Favorite)

Defined in: [WAProto/index.d.ts:12022](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L12022)

#### Parameters

##### d

#### Returns

[`Favorite`](/proto-reference/SyncActionValue/FavoritesAction/classes/Favorite)

***

### getTypeUrl()

> `static` **getTypeUrl**(`typeUrlPrefix`?): `string`

Defined in: [WAProto/index.d.ts:12025](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L12025)

#### Parameters

##### typeUrlPrefix?

`string`

#### Returns

`string`

***

### toJSON()

> **toJSON**(): `object`

Defined in: [WAProto/index.d.ts:12024](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L12024)

#### Returns

`object`

***

### toObject()

> `static` **toObject**(`m`, `o`?): `object`

Defined in: [WAProto/index.d.ts:12023](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L12023)

#### Parameters

##### m

[`Favorite`](/proto-reference/SyncActionValue/FavoritesAction/classes/Favorite)

##### o?

`IConversionOptions`

#### Returns

`object`
