Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): update / fix types declaration file #41

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": false,
"description": "1000+ Pixel-perfect svg icons for your next project as Vue components",
"main": "./dist/vue-unicons.umd.js",
"types": "src/types.d.ts",
"scripts": {
"serve": "vue-cli-service serve",
"build": "rm -rf ./dist && npm run build:libs && npm run build:libs-vue2",
Expand Down Expand Up @@ -88,6 +89,5 @@
"vue-cli-service lint",
"git add"
]
},
"types": "./src/main.d.ts"
}
}
11 changes: 0 additions & 11 deletions src/main.d.ts

This file was deleted.

39 changes: 39 additions & 0 deletions src/types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
type UniconIcon = {
name: string
style: string
path: string
}

type UniconOptions = {
fill: string
height: number
width: number
}

declare module 'vue-unicons' {
import Vue from 'vue'

interface VueUnicon {
add: (icons: UniconIcon[]) => void
install: (v: typeof Vue, options?: Partial<UniconOptions>) => void
}

const Unicon: VueUnicon

export default Unicon
}

declare module 'vue-unicons/src/icons'

declare module 'vue-unicons/dist/vue-unicons-ssr.common.js' {
import Vue from 'vue'

interface VueUnicon {
add: (icons: UniconIcon[]) => void
install: (v: typeof Vue, options?: Partial<UniconOptions>) => void
}

const Unicon: VueUnicon

export default Unicon
}