Skip to content

Commit

Permalink
feat: add types
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayakkulkarni committed Aug 1, 2021
1 parent 7910651 commit 7348c58
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
6 changes: 6 additions & 0 deletions stylelint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
extends: ['stylelint-config-standard', 'stylelint-config-prettier'],
// add your custom config here
// https://stylelint.io/user-guide/configuration
rules: {},
};
41 changes: 41 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { Component } from 'vue';

declare global {
interface HTMLVideoElement {
requestPictureInPicture(): Promise<PictureInPictureWindow>;
}

interface Document {
readonly pictureInPictureElement: Element | null;
exitPictureInPicture(): Promise<void>;
}
}

export type VideoOptionsProps = {
wrapper: string;
src: string;
poster: string;
class: string;
height: string;
width: string;
};

export type ButtonOptionsProps = {
wrapper: string;
type: string;
class: string;
label: string;
};

type Props = {
wrapper?: string;
videoOptions?: VideoOptionsProps;
buttonOptions?: ButtonOptionsProps;
};

type State = {
isPipSupported: boolean;
video: null | HTMLVideoElement;
};

export const VPip: Component;

0 comments on commit 7348c58

Please sign in to comment.