-
Notifications
You must be signed in to change notification settings - Fork 56
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
types: add types declaration file #15
Conversation
src/main.d.ts
Outdated
@@ -0,0 +1,6 @@ | |||
declare module 'vue-unicons' { | |||
export function install(Vue: any): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know very little about TS, but I heard that using the any
type is an anti-pattern. Vue also has type declarations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My mistake, export function install(Vue: VueConstructor, options?: object): void
would be better for that line.
It adds the options
argument as well but doesn't make it required, since I notice the .install
method doesn't actually refer to the options argument at all at this time.
If you need me to submit a new pull request then let me know, I'm new to the whole process on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a new PR is not necessary. You just need to commit all changes and PR itself to update.
Please see recommendation - https://app.codacy.com/app/antonreshetov/vue-unicons/pullRequest?prid=3495275 |
close #14 # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # On branch master # Your branch is up to date with 'origin/master'. # # Changes to be committed: # new file: package-lock.json # modified: package.json # new file: src/main.d.ts #
@tedjenkins please remove package-lock.json from PR |
close #14
Thank you for your contribution to the vue-unicons repo.
Before submitting this PR, please make sure:
What kind of change does this PR introduce? (check at least one)
Importantly
To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on PR.