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

chore(type): add customize icon type of index.d.ts, closed #18 #19

Merged
merged 2 commits into from
Jan 26, 2022
Merged

chore(type): add customize icon type of index.d.ts, closed #18 #19

merged 2 commits into from
Jan 26, 2022

Conversation

Zhengqbbb
Copy link
Contributor

Why:

My icons array is not well supported and type checked when I use typescript

const icons = [
  {
    name: "mail",
    width: 24,
    height: 24,
    d: "M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-1 14H5c-.55 0-1-.45-1-1V8l6.94 4.34c.65.41 1.47.41 2.12 0L20 8v9c0 .55-.45 1-1 1zm-7-7L4 6h16l-8 5z"
  }
];
addIcons(...icons);

Expect

import type { CustomizeIconType } from "oh-vue-icons";
const icons: CustomizeIconType[] = [
  {
    name: "mail",
    width: 24,
    height: 24,
    d: "M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-1 14H5c-.55 0-1-.45-1-1V8l6.94 4.34c.65.41 1.47.41 2.12 0L20 8v9c0 .55-.45 1-1 1zm-7-7L4 6h16l-8 5z"
  }
];
addIcons(...icons);

@Renovamen Renovamen merged commit 90da087 into Renovamen:master Jan 26, 2022
@Renovamen
Copy link
Owner

Done, thank you!

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.

None yet

2 participants