Skip to content

Commit

Permalink
Adjust typing for Vue 3
Browse files Browse the repository at this point in the history
  • Loading branch information
hrynko committed Nov 4, 2021
1 parent 6da638a commit 1031c38
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"types": "types/index.d.ts",
"files": [
"dist/*",
"src/*"
"src/*",
"types/*"
],
"license": "MIT",
"author": "Aliaksei Hrynko (https://github.com/hrynko)",
Expand Down
20 changes: 7 additions & 13 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { VueConstructor } from 'vue';

export default VuePdfEmbed;
export const VuePdfEmbed: VuePdfEmbedConstructor;
import { DefineComponent } from 'vue';

export interface VuePdfEmbedProps {
page?: number;
Expand All @@ -14,13 +11,10 @@ export interface VuePdfEmbedData {
pageNums: number[];
}

export interface VuePdfEmbedMethods {
load: Promise<void>;
render: Promise<void>;
}
export const VuePdfEmbed: DefineComponent<
VuePdfEmbedProps,
unknown,
VuePdfEmbedData
>;

export interface VuePdfEmbedConstructor extends VueConstructor {
props: VuePdfEmbedProps;
data: () => VuePdfEmbedData;
methods: VuePdfEmbedMethods;
}
export default VuePdfEmbed;

0 comments on commit 1031c38

Please sign in to comment.