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

Update index.d.ts to add export declaration. #462

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ interface FontAwesomeLayersTextProps {
declare const FontAwesomeIcon: DefineComponent<FontAwesomeIconProps>
declare const FontAwesomeLayers: DefineComponent<FontAwesomeLayersProps>
declare const FontAwesomeLayersText: DefineComponent<FontAwesomeLayersTextProps>

export { FontAwesomeIcon, FontAwesomeLayers, FontAwesomeLayersText }
32 changes: 19 additions & 13 deletions src/components/__fixtures__/helpers.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
import { mount } from '@vue/test-utils'
import FontAwesomeIcon from '../FontAwesomeIcon'
import { parse } from '@fortawesome/fontawesome-svg-core'
import { mount } from "@vue/test-utils";
import FontAwesomeIcon from "../FontAwesomeIcon";
import { parse } from "@fortawesome/fontawesome-svg-core";

export function compileAndMount (definition, props = {}) {
return mount(definition, { props })
export function compileAndMount(definition, props = {}) {
return mount(definition, { props });
}

export function mountFromProps (props = {}) {
return mount(FontAwesomeIcon, { props })
export function mountFromProps(props = {}) {
return mount(FontAwesomeIcon, { props });
}

export function coreHasFeature (feature) {
if (feature === REFERENCE_ICON_BY_STYLE || feature === ICON_ALIASES || feature === REFERENCE_ICON_USING_STRING) {
return parse.icon
export function coreHasFeature(feature) {
if (
feature === REFERENCE_ICON_BY_STYLE ||
feature === ICON_ALIASES ||
feature === REFERENCE_ICON_USING_STRING ||
feature === REFERENCE_ICON_USING_FAMILY
) {
return parse.icon;
}
}

export const REFERENCE_ICON_BY_STYLE = 0x00
export const ICON_ALIASES = 0x01
export const REFERENCE_ICON_USING_STRING = 0x02
export const REFERENCE_ICON_BY_STYLE = 0x00;
export const ICON_ALIASES = 0x01;
export const REFERENCE_ICON_USING_STRING = 0x02;
export const REFERENCE_ICON_USING_FAMILY = 0x03;
48 changes: 18 additions & 30 deletions src/components/__fixtures__/icons.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,23 @@
export const faCoffee = {
prefix: 'fas',
iconName: 'coffee',
icon: [
640,
512,
[],
"f001",
"..."
]
}
prefix: "fas",
iconName: "coffee",
icon: [640, 512, [], "f001", "..."],
};

export const faCircle = {
prefix: 'fas',
iconName: 'circle',
icon: [
640,
512,
[],
"f002",
"..."
]
}
prefix: "fas",
iconName: "circle",
icon: [640, 512, [], "f002", "..."],
};

export const faAlien = {
prefix: 'fad',
iconName: 'alien',
icon: [
640,
512,
[],
"f003",
"..."
]
}
prefix: "fad",
iconName: "alien",
icon: [640, 512, [], "f003", "..."],
};

export const faDog = {
prefix: "fass",
iconName: "dog",
icon: [640, 512, [], "f200", "..."],
};