2
0
mirror of https://github.com/iconify/iconify.git synced 2025-01-23 07:08:34 +00:00

chore: rename external pkg type

This commit is contained in:
userquin 2024-01-26 18:31:00 +01:00
parent a14a3c4b0e
commit b95e5b95c5
3 changed files with 6 additions and 6 deletions

View File

@ -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,

View File

@ -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;

View File

@ -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.