2
0
mirror of https://github.com/iconify/iconify.git synced 2024-11-09 14:50:56 +00:00

Make replaceIDs function optional in builder interface

This commit is contained in:
Vjacheslav Trushkin 2022-04-30 21:40:12 +03:00
parent 9077105e60
commit 6a9dc8aabc
2 changed files with 1 additions and 3 deletions

View File

@ -12,7 +12,7 @@ import type { IconifyIconBuildResult } from '@iconify/utils/lib/svg/build';
* Interface for exported builder functions
*/
export interface IconifyBuilderFunctions {
replaceIDs: (body: string, prefix?: string | (() => string)) => string;
replaceIDs?: (body: string, prefix?: string | (() => string)) => string;
calculateSize: (
size: string | number,
ratio: number,

View File

@ -11,7 +11,6 @@ import {
import { listIcons, shareStorage } from '@iconify/core/lib/storage/storage';
import type { IconifyBuilderFunctions } from '@iconify/core/lib/builder/functions';
import { buildIcon } from '@iconify/core/lib/builder/functions';
import { replaceIDs } from '@iconify/utils/lib/svg/id';
import { calculateSize } from '@iconify/utils/lib/svg/size';
// API
@ -158,7 +157,6 @@ export function exportFunctions(): IconifyExportedFunctions {
addIcon,
addCollection,
calculateSize,
replaceIDs,
buildIcon,
loadIcons,
loadIcon,