add vuedraggable type (#43117)

* add vuedraggable types

* fix lint error
This commit is contained in:
이효범 2020-03-27 14:36:47 +09:00 committed by GitHub
parent 37cd32e962
commit de4580242d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 53 additions and 0 deletions

17
types/vuedraggable/index.d.ts vendored Normal file
View File

@ -0,0 +1,17 @@
// Type definitions for vuedraggable 2.23
// Project: https://github.com/SortableJS/Vue.Draggable
// Definitions by: Beomy <https://github.com/beomy>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.5
import { VueConstructor } from 'vue';
interface DraggableConstructor extends VueConstructor {
props: any;
data: () => any;
watch: any;
methods: any;
}
export default draggable;
export const draggable: DraggableConstructor;

View File

@ -0,0 +1,6 @@
{
"private": true,
"dependencies": {
"vue": ">=2.0.0"
}
}

View File

@ -0,0 +1,16 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6", "dom"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": ["index.d.ts", "vuedraggable-tests.ts"]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

View File

@ -0,0 +1,13 @@
import Vue from 'vue';
import draggable from 'vuedraggable';
new Vue({
el: '#app',
template: `<draggable v-model="list"></draggable>`,
components: {
draggable,
},
data: {
list: []
}
});