mirror of
https://github.com/iconify/iconify.git
synced 2025-01-22 22:58:27 +00:00
chore: rename external pkg type
This commit is contained in:
parent
a14a3c4b0e
commit
b95e5b95c5
@ -79,7 +79,7 @@ export { getIconsCSS, getIconsContentCSS } from './css/icons';
|
|||||||
export type {
|
export type {
|
||||||
CustomIconLoader,
|
CustomIconLoader,
|
||||||
CustomCollections,
|
CustomCollections,
|
||||||
ExternalPkgInfo,
|
ExternalPkgName,
|
||||||
IconCustomizer,
|
IconCustomizer,
|
||||||
IconCustomizations,
|
IconCustomizations,
|
||||||
IconifyLoaderOptions,
|
IconifyLoaderOptions,
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
import type { AutoInstall, CustomIconLoader, ExternalPkgInfo } from './types';
|
import { AutoInstall, CustomIconLoader, ExternalPkgName } from './types';
|
||||||
import { loadCollectionFromFS } from './fs';
|
import { loadCollectionFromFS } from './fs';
|
||||||
import { searchForIcon } from './modern';
|
import { searchForIcon } from './modern';
|
||||||
import { warnOnce } from './warn';
|
import { warnOnce } from './warn';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a CustomIconLoader collection from an external scoped package collection.
|
* Creates a CustomIconLoader collection from an external package collection.
|
||||||
*
|
*
|
||||||
* @param packageName The scoped package name.
|
* @param packageName The package name.
|
||||||
* @param autoInstall {AutoInstall} [autoInstall=false] - whether to automatically install
|
* @param autoInstall {AutoInstall} [autoInstall=false] - whether to automatically install
|
||||||
*/
|
*/
|
||||||
export function createExternalPackageIconLoader(
|
export function createExternalPackageIconLoader(
|
||||||
packageName: ExternalPkgInfo,
|
packageName: ExternalPkgName,
|
||||||
autoInstall: AutoInstall = false
|
autoInstall: AutoInstall = false
|
||||||
) {
|
) {
|
||||||
let scope: string;
|
let scope: string;
|
||||||
|
@ -5,7 +5,7 @@ import type { IconifyJSON } from '@iconify/types';
|
|||||||
/**
|
/**
|
||||||
* The external scoped package name: e.g. @my-collections/collection-a.
|
* The external scoped package name: e.g. @my-collections/collection-a.
|
||||||
*/
|
*/
|
||||||
export type ExternalPkgInfo = string | [name: string, collection: string];
|
export type ExternalPkgName = string | [scope: string, collection: string];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type for universal icon loader.
|
* Type for universal icon loader.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user