Skip to content

Commit 6e96720

Browse files
authored
chore: add type for splitepanes package (#38)
1 parent e00f2f0 commit 6e96720

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

components/MainPlayground.vue

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ So that we can discuss about the directions and plans, to avoid wasted efforts.
44
-->
55

66
<script setup lang="ts">
7-
// @ts-expect-error missing type
87
import { Pane, Splitpanes } from 'splitpanes'
98

109
const ui = useUiState()

splitpanes.d.ts

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// TODO install @types/splitpanes once updated
2+
declare module 'splitpanes' {
3+
import type { Component } from 'vue'
4+
5+
export interface SplitpaneProps {
6+
horizontal: boolean
7+
pushOtherPanes: boolean
8+
dblClickSplitter: boolean
9+
firstSplitter: boolean
10+
}
11+
12+
export interface PaneProps {
13+
size: number | string
14+
minSize: number | string
15+
maxSize: number | string
16+
}
17+
18+
export type Pane = Component<PaneProps>
19+
export const Pane: Pane
20+
export const Splitpanes: Component<SplitpaneProps>
21+
}

0 commit comments

Comments
 (0)