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

types: add types declaration file #15

Merged
merged 3 commits into from
Apr 26, 2019
Merged

types: add types declaration file #15

merged 3 commits into from
Apr 26, 2019

Conversation

geopic
Copy link
Contributor

@geopic geopic commented Apr 25, 2019

close #14

Thank you for your contribution to the vue-unicons repo.
Before submitting this PR, please make sure:

  • Your code builds clean without any errors or warnings
  • Your commits follow the сonvention

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Refactor

Importantly

To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on PR.

src/main.d.ts Outdated
@@ -0,0 +1,6 @@
declare module 'vue-unicons' {
export function install(Vue: any): void
Copy link
Owner

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.

Copy link
Contributor Author

@geopic geopic Apr 26, 2019

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.

Copy link
Owner

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.

@antonreshetov
Copy link
Owner

geopic added 2 commits April 26, 2019 10:58
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
#
@antonreshetov antonreshetov merged commit e9753d0 into antonreshetov:master Apr 26, 2019
antonreshetov added a commit that referenced this pull request Apr 26, 2019
This reverts commit e9753d0, reversing
changes made to 5070add.
@antonreshetov
Copy link
Owner

@tedjenkins please remove package-lock.json from PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typings?
2 participants