Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: prepare for TS defs generation #225

Merged
merged 1 commit into from
May 25, 2020
Merged

feat: prepare for TS defs generation #225

merged 1 commit into from
May 25, 2020

Conversation

web-padawan
Copy link
Member

Fixes #220

Generated TS definitions look like this:

import {PolymerElement} from '@polymer/polymer/polymer-element.js';

import {ThemableMixin} from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';

import {ControlStateMixin} from '@vaadin/vaadin-control-state-mixin/vaadin-control-state-mixin.js';

import {IronResizableBehavior} from '@polymer/iron-resizable-behavior/iron-resizable-behavior.js';

import {ElementMixin} from '@vaadin/vaadin-element-mixin/vaadin-element-mixin.js';

import {html} from '@polymer/polymer/lib/utils/html-tag.js';

import {FlattenedNodesObserver} from '@polymer/polymer/lib/utils/flattened-nodes-observer.js';

import {mixinBehaviors} from '@polymer/polymer/lib/legacy/class.js';

declare class SelectElement extends
  ElementMixin(
  ControlStateMixin(
  ThemableMixin(
  PolymerElement))) {
  readonly focusElement: HTMLElement;
  opened: boolean;
  renderer: SelectRenderer|undefined;
  errorMessage: string;
  label: string|null|undefined;
  value: string;
  required: boolean|null|undefined;
  invalid: boolean;
  name: string|null|undefined;
  placeholder: string|null|undefined;
  readonly: boolean;
  ready(): void;
  connectedCallback(): void;
  disconnectedCallback(): void;
  _setFocused(focused: boolean): void;
  render(): void;
  notifyResize(): void;
  _onKeyDown(e: KeyboardEvent): void;
  _onKeyDownInside(e: KeyboardEvent): void;
  validate(): boolean;
}

declare global {
  interface HTMLElementTagNameMap {
    "vaadin-select": SelectElement;
  }
}

export {SelectElement};

import {SelectRenderer} from '../@types/interfaces';

bower.json Show resolved Hide resolved
@web-padawan web-padawan requested a review from Haprog May 25, 2020 07:40
@web-padawan web-padawan merged commit 695a6cc into master May 25, 2020
@web-padawan web-padawan deleted the gen-ts-defs branch May 25, 2020 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate TypeScript definitions for P3
2 participants