Skip to content

# Class: LensExtension

Main.LensExtension

## Hierarchy

- `LensExtension`

↳ LensExtension

## Table of contents

### Constructors

- constructor

### Properties

- [Disposers]
- appMenus
- id
- isBundled
- manifest
- manifestPath
- protocolHandlers

### Accessors

- description
- name
- version

### Methods

- addCatalogSource
- disable
- enable
- getExtensionFileFolder
- navigate
- onActivate
- onDeactivate
- removeCatalogSource

## Constructors

### constructor

• new LensExtension(`__namedParameters`)

#### Parameters

Name | Type
--- | ---
`__namedParameters` | `InstalledExtension`

#### Inherited from

LensExtension.constructor

## Properties

### [Disposers]

• [Disposers]: `ExtendableDisposer`

#### Inherited from

LensExtension.__@Disposers@24423

### appMenus

• appMenus: `MenuRegistration`[] = []

### id

• `Readonly` id: `string`

#### Inherited from

LensExtension.id

### isBundled

• `Readonly` isBundled: `boolean`

#### Inherited from

LensExtension.isBundled

### manifest

• `Readonly` manifest: `LensExtensionManifest`

#### Inherited from

LensExtension.manifest

### manifestPath

• `Readonly` manifestPath: `string`

#### Inherited from

LensExtension.manifestPath

### protocolHandlers

• protocolHandlers: ProtocolHandlerRegistration[] = []

#### Inherited from

LensExtension.protocolHandlers

## Accessors

### description

• `get` description(): `string`

#### Returns

`string`

### name

• `get` name(): `string`

#### Returns

`string`

### version

• `get` version(): `string`

#### Returns

`string`

## Methods

### addCatalogSource

▸ addCatalogSource(`id`, `source`): `void`

#### Parameters

Name | Type
--- | ---
`id` | `string`
`source` | `IObservableArray`<CatalogEntity<CatalogEntityMetadata, CatalogEntityStatus, CatalogEntitySpec>>

#### Returns

`void`

### disable

▸ disable(): `Promise`<void>

#### Returns

`Promise`<void>

#### Inherited from

LensExtension.disable

### enable

▸ enable(`register`): `Promise`<void>

#### Parameters

Name | Type
--- | ---
`register` | (`ext`: `LensExtension`) => `Promise`<Disposer[]>

#### Returns

`Promise`<void>

#### Inherited from

LensExtension.enable

### getExtensionFileFolder

▸ getExtensionFileFolder(): `Promise`<string>

getExtensionFileFolder returns the path to an already created folder. This folder is for the sole use of this extension.

Note: there is no security done on this folder, only obfiscation of the folder name.

#### Returns

`Promise`<string>

#### Inherited from

LensExtension.getExtensionFileFolder

### navigate

▸ navigate(`pageId?`, `params?`, `frameId?`): `Promise`<void>

#### Parameters

Name | Type
--- | ---
`pageId?` | `string`
`params?` | `Record`<string, any>
`frameId?` | `number`

#### Returns

`Promise`<void>

### onActivate

▸ `Protected` onActivate(): `void` | `Promise`<void>

#### Returns

`void` | `Promise`<void>

#### Inherited from

LensExtension.onActivate

### onDeactivate

▸ `Protected` onDeactivate(): `void` | `Promise`<void>

#### Returns

`void` | `Promise`<void>

#### Inherited from

LensExtension.onDeactivate

### removeCatalogSource

▸ removeCatalogSource(`id`): `void`

#### Parameters

Name | Type
--- | ---
`id` | `string`

#### Returns

`void`