Skip to content

Commit 9d7998b

Browse files
committed
Added rudimentary typings
1 parent 2086327 commit 9d7998b

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

package-lock.json

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
"main": "dist/Vueresize.js",
66
"files": [
77
"dist/Vueresize.js",
8-
"dist/Vueresize.js.map"
8+
"dist/Vueresize.js.map",
9+
"types/index.d.ts",
10+
"types/vueresize.d.ts"
911
],
12+
"types": "types/index.d.ts",
1013
"keywords": [
1114
"vue",
1215
"vuejs",
@@ -20,7 +23,6 @@
2023
},
2124
"dependencies": {
2225
"css-element-queries": "^1.0.2",
23-
"intersection-observer": "^0.5.0",
2426
"lodash.debounce": "^4.0.8"
2527
},
2628
"devDependencies": {

src/Vueresize.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import ResizeSensor from 'resizeSensor'
22
import lodashDebounce from 'lodash.debounce'
3-
require('./findPolyfill');
4-
require('intersection-observer');
53

64
const { debounce = lodashDebounce } = lodashDebounce;
75
const defaultDelay = 150;

types/index.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { VueResizeDirectiveOptions } from "./vueresize";
2+
3+
declare var VueResize: VueResizeDirectiveOptions;
4+
export default VueResize;

types/vueresize.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { PluginObject } from "vue";
2+
import { DirectiveOptions } from "vue/types/options";
3+
4+
export interface VueResizeDirectiveOptions extends DirectiveOptions {}

0 commit comments

Comments
 (0)