chore(): fix component.d.ts random changes

This commit is contained in:
Manu Mtz.-Almeida
2018-10-08 09:50:35 -05:00
parent 5f659420fd
commit 2909e1cc7b
3 changed files with 7 additions and 4 deletions

View File

@@ -35,6 +35,7 @@ import {
NavComponent,
NavOptions,
OverlayEventDetail,
OverlaySelect,
PickerButton,
PickerColumn,
PickerOptions,
@@ -4021,7 +4022,7 @@ export namespace Components {
* The text to display on the ok button. Default: `OK`.
*/
'okText': string;
'open': (ev?: UIEvent | undefined) => Promise<HTMLIonAlertElement | HTMLIonPopoverElement | HTMLIonActionSheetElement>;
'open': (ev?: UIEvent | undefined) => Promise<OverlaySelect>;
/**
* The text to display when the select is empty.
*/

View File

@@ -1,6 +1,6 @@
import { Component, ComponentInterface, Element, Event, EventEmitter, Listen, Method, Prop, State, Watch } from '@stencil/core';
import { ActionSheetButton, ActionSheetOptions, AlertOptions, CssClassMap, Mode, PopoverOptions, SelectInputChangeEvent, SelectInterface, SelectPopoverOption, StyleEvent } from '../../interface';
import { ActionSheetButton, ActionSheetOptions, AlertOptions, CssClassMap, Mode, OverlaySelect, PopoverOptions, SelectInputChangeEvent, SelectInterface, SelectPopoverOption, StyleEvent } from '../../interface';
import { deferEvent, renderHiddenInput } from '../../utils/helpers';
import { hostContext } from '../../utils/theme';
@@ -17,7 +17,7 @@ export class Select implements ComponentInterface {
private childOpts: HTMLIonSelectOptionElement[] = [];
private inputId = `ion-sel-${selectIds++}`;
private labelId?: string;
private overlay?: HTMLIonActionSheetElement | HTMLIonAlertElement | HTMLIonPopoverElement;
private overlay?: OverlaySelect;
@Element() el!: HTMLIonSelectElement;
@@ -261,7 +261,7 @@ export class Select implements ComponentInterface {
}
@Method()
open(ev?: UIEvent): Promise<HTMLIonActionSheetElement | HTMLIonAlertElement | HTMLIonPopoverElement> {
open(ev?: UIEvent): Promise<OverlaySelect> {
let selectInterface = this.interface;
if ((selectInterface === 'action-sheet' || selectInterface === 'popover') && this.multiple) {

View File

@@ -43,6 +43,8 @@ export interface HTMLIonOverlayElement extends HTMLStencilElement {
dismiss(data?: any, role?: string): Promise<boolean>;
}
export type OverlaySelect = HTMLIonActionSheetElement | HTMLIonAlertElement | HTMLIonPopoverElement;
// TODO: uncomment when TS 3.0 issues are fixed
// Overlay checks
/*