Skip to content

Commit

Permalink
fix: 🐛 type
Browse files Browse the repository at this point in the history
  • Loading branch information
chantouchsek committed Apr 13, 2021
1 parent 214fd20 commit b386c84
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import Vue from 'vue';
import TuiCalendar from 'tui-calendar';
import Vue, { PluginFunction } from 'vue';

type FunctionKeys<T extends object> = {[K in keyof T]: T[K] extends Function ? K : never}[keyof T];

type CalendarFnKeys = FunctionKeys<TuiCalendar>;

export class Calendar extends Vue {
export default class VueCalendar extends Vue {
public invoke<T extends CalendarFnKeys>(fname: T, ...args: Parameters<TuiCalendar[T]>): ReturnType<TuiCalendar[T]>;
public getRootElement(): HTMLElement;

static install(): PluginFunction<any>;
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chantouchsek/vue-calendar",
"version": "0.0.1",
"version": "0.0.2",
"description": "TOAST UI Calendar for Vue",
"main": "dist/vue-calendar.js",
"types": "index.d.ts",
Expand Down

0 comments on commit b386c84

Please sign in to comment.