Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Plugin<TTarget>

A plugin.

Type parameters

Hierarchy

  • EventEmitter
  • Disposable
    • Plugin

Implemented by

Index

Constructors

constructor

  • new Plugin(callOnDispose: Function): Plugin
  • Creates a new Disposable calling the provided function on dispose.

    Parameters

    • callOnDispose: Function

      Function that disposes something.

    Returns Plugin

Properties

Optional __file

__file: string

[INTERNAL] DO NOT DEFINE OR OVERWRITE THIS PROPERTY BY YOUR OWN!

Gets the filename of the plugin.

Optional __filePath

__filePath: string

[INTERNAL] DO NOT DEFINE OR OVERWRITE THIS PROPERTY BY YOUR OWN!

Gets the full path of the plugin's file.

Optional __index

__index: number

[INTERNAL] DO NOT DEFINE OR OVERWRITE THIS PROPERTY BY YOUR OWN!

Gets the index of the plugin.

Optional __type

__type: string

[INTERNAL] DO NOT DEFINE OR OVERWRITE THIS PROPERTY BY YOUR OWN!

Gets the type of the plugin.

Optional canDelete

canDelete: boolean

Gets if the plugin can delete files or not.

Optional canDownload

canDownload: boolean

Gets if the plugin can download files or not.

Optional canList

canList: boolean

Gets if the plugin can list directories or not.

Optional canRemoveFolders

canRemoveFolders: boolean

Gets if the plugin can remove whole folders or not.

Optional canUpload

canUpload: boolean

Gets if the plugin can upload files or not.

Optional deleteFiles

deleteFiles: function

Deletes files.

param

context.

Type declaration

    • Parameters

      Returns void | PromiseLike<void>

Optional downloadFiles

downloadFiles: function

Downloads files.

param

context.

Type declaration

Optional initialize

initialize: function

Initializes the plugin.

returns

The result.

Type declaration

Optional listDirectory

listDirectory: function

List a directory.

param

context.

returns

The result.

Type declaration

Optional removeFolders

removeFolders: function

Removes folders.

param

context.

Type declaration

Optional uploadFiles

uploadFiles: function

Uploads files.

param

context.

Type declaration

    • Parameters

      Returns void | PromiseLike<void>

Methods

addListener

  • addListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

dispose

  • dispose(): any
  • Dispose this object.

    Returns any

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): (string | symbol)[]
  • Returns (string | symbol)[]

getMaxListeners

  • getMaxListeners(): number
  • Returns number

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

on

  • on(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

once

  • once(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

prependListener

  • prependListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

Static from

  • from(...disposableLikes: object[]): Disposable
  • Combine many disposable-likes into one. Use this method when having objects with a dispose function which are not instances of Disposable.

    Parameters

    • Rest ...disposableLikes: object[]

      Objects that have at least a dispose-function member.

    Returns Disposable

    Returns a new disposable which, upon dispose, will dispose all provided disposables.

Generated using TypeDoc