From ce2854e2fcf9d5a4fc50442b40f60e9e6111d06f Mon Sep 17 00:00:00 2001 From: Ekene Ashinze Date: Sun, 9 Jun 2019 16:50:42 +0100 Subject: [PATCH 1/5] Create declaration file --- index.d.ts | 406 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 406 insertions(+) create mode 100644 index.d.ts diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 000000000..29afee187 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,406 @@ +// Type definitions for medium-editor 5.0.0 +// Project: medium-editor +// Definitions by: Ashinze Ekene + +export as namespace MediumEditor; + +export = MediumEditor; + +declare class MediumEditor { + constructor(element: string | HTMLElement | string[] | NodeList | HTMLCollection, options: MediumEditor.MediumOptions); +} + +declare namespace MediumEditor { + /** + * Tear down the editor if already setup + * - Calling the destroy() method on each extension within the editor. + * This should allow all extension to be torn down and cleaned up, including the toolbar and its elements + * - Detaching all event listeners from the DOM + * - Detaching all references to custom event listeners + * - Remove any custom attributes from the editor **elements** + * - Unhide any `