Skip to content

Commit

Permalink
Added rudimentary typings
Browse files Browse the repository at this point in the history
  • Loading branch information
ELFoglalt committed Mar 23, 2020
1 parent 2086327 commit 9d7998b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
5 changes: 0 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
"main": "dist/Vueresize.js",
"files": [
"dist/Vueresize.js",
"dist/Vueresize.js.map"
"dist/Vueresize.js.map",
"types/index.d.ts",
"types/vueresize.d.ts"
],
"types": "types/index.d.ts",
"keywords": [
"vue",
"vuejs",
Expand All @@ -20,7 +23,6 @@
},
"dependencies": {
"css-element-queries": "^1.0.2",
"intersection-observer": "^0.5.0",
"lodash.debounce": "^4.0.8"
},
"devDependencies": {
Expand Down
2 changes: 0 additions & 2 deletions src/Vueresize.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import ResizeSensor from 'resizeSensor'
import lodashDebounce from 'lodash.debounce'
require('./findPolyfill');
require('intersection-observer');

const { debounce = lodashDebounce } = lodashDebounce;
const defaultDelay = 150;
Expand Down
4 changes: 4 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { VueResizeDirectiveOptions } from "./vueresize";

declare var VueResize: VueResizeDirectiveOptions;
export default VueResize;
4 changes: 4 additions & 0 deletions types/vueresize.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { PluginObject } from "vue";
import { DirectiveOptions } from "vue/types/options";

export interface VueResizeDirectiveOptions extends DirectiveOptions {}

0 comments on commit 9d7998b

Please sign in to comment.