From 1b822b5a71585f88b3ebee7a93824aa61ce0d438 Mon Sep 17 00:00:00 2001 From: Pawel Date: Sat, 25 Apr 2020 15:49:07 -0700 Subject: [PATCH] chore: updating mixin's type --- src/ApiFormMixin.d.ts | 10 ++++++++-- test/test-element.js | 5 ++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/ApiFormMixin.d.ts b/src/ApiFormMixin.d.ts index 1c7aae7..7baf8d3 100644 --- a/src/ApiFormMixin.d.ts +++ b/src/ApiFormMixin.d.ts @@ -3,6 +3,14 @@ import {IronFormElement} from '@polymer/iron-form'; export {ApiFormMixin}; +declare function ApiFormMixin {}>(base: T): T & ApiFormMixinConstructor; + +interface ApiFormMixinConstructor { + new(...args: any[]): ApiFormMixin; +} + +export {ApiFormMixinConstructor}; + /** * A mixin to be implemented to elements that processes AMF data via form * data model and displays forms from the model. @@ -176,5 +184,3 @@ interface ApiFormMixin { */ _gaEvent(category: string, action: string, label?: string): void; } - -declare const ApiFormMixin: object; diff --git a/test/test-element.js b/test/test-element.js index 12bfd7e..8d672c8 100644 --- a/test/test-element.js +++ b/test/test-element.js @@ -3,9 +3,8 @@ import { ApiFormMixin } from '../api-form-mixin.js'; import '@polymer/iron-form/iron-form.js'; import styles from '../api-form-styles.js'; /** - * @customElement - * @demo demo/index.html - * @appliesMixin ApiFormMixin + * @mixes ApiFormMixin + * @extends LitElement */ class TestElement extends ApiFormMixin(LitElement) { static get styles() {