2
0
mirror of https://github.com/iconify/iconify.git synced 2025-01-12 01:45:41 +00:00

Require resources property in API config

This commit is contained in:
Vjacheslav Trushkin 2021-09-20 13:25:36 +03:00
parent 027a317e4e
commit d1b7d76d97
2 changed files with 4 additions and 3 deletions

View File

@ -11,7 +11,8 @@ export interface IconifyAPIConfig extends RedundancyConfig {
maxURL: number;
}
export type PartialIconifyAPIConfig = Partial<IconifyAPIConfig>;
export type PartialIconifyAPIConfig = Partial<IconifyAPIConfig> &
Pick<IconifyAPIConfig, 'resources'>;
/**
* Create full API configuration from partial data

View File

@ -5,7 +5,7 @@ import type {
IconifyIconLoaderAbort,
IconifyIconLoaderCallback,
} from '../interfaces/loader';
import type { GetAPIConfig, IconifyAPIConfig } from './config';
import type { GetAPIConfig, PartialIconifyAPIConfig } from './config';
import { getAPIConfig, setAPIConfig } from './config';
import type { IconifyAPIModule } from './modules';
import { setAPIModule } from './modules';
@ -27,7 +27,7 @@ export interface IconifyAPIFunctions {
*/
addAPIProvider: (
provider: string,
customConfig: Partial<IconifyAPIConfig>
customConfig: PartialIconifyAPIConfig
) => boolean;
}