mirror of
https://github.com/Mibew/simple-icons.git
synced 2024-11-15 09:54:11 +03:00
Fix guidelines and license types on SimpleIcon TS interface (#8581)
This commit is contained in:
parent
ef90d9c2ee
commit
4631c15a3b
21
sdk.d.ts
vendored
21
sdk.d.ts
vendored
@ -3,6 +3,8 @@
|
||||
* Types for Simple Icons SDK.
|
||||
*/
|
||||
|
||||
import type { License } from './types.d.ts';
|
||||
|
||||
/**
|
||||
* The data for a third-party extension.
|
||||
*
|
||||
@ -21,25 +23,6 @@ type ThirdPartyExtensionSubject = {
|
||||
url: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* The license for a Simple Icon.
|
||||
*
|
||||
* Corresponds to the `license` property in the *_data/simple-icons.json* file.
|
||||
*
|
||||
* @see {@link https://github.com/simple-icons/simple-icons/blob/develop/CONTRIBUTING.md#optional-data Optional Data}
|
||||
*/
|
||||
export type License = SPDXLicense | CustomLicense;
|
||||
|
||||
type SPDXLicense = {
|
||||
type: string;
|
||||
url?: string;
|
||||
};
|
||||
|
||||
type CustomLicense = {
|
||||
type: 'custom';
|
||||
url: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* The aliases for a Simple Icon.
|
||||
*
|
||||
|
29
types.d.ts
vendored
29
types.d.ts
vendored
@ -1,3 +1,23 @@
|
||||
/**
|
||||
* The license for a Simple Icon.
|
||||
*
|
||||
* @see {@link https://github.com/simple-icons/simple-icons/blob/develop/CONTRIBUTING.md#optional-data Optional Data}
|
||||
*/
|
||||
export type License = SPDXLicense | CustomLicense;
|
||||
|
||||
type SPDXLicense = {
|
||||
type: string;
|
||||
url?: string;
|
||||
};
|
||||
|
||||
type CustomLicense = {
|
||||
type: 'custom';
|
||||
url: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* The data for a Simple Icon as is exported by the npm package.
|
||||
*/
|
||||
export interface SimpleIcon {
|
||||
title: string;
|
||||
slug: string;
|
||||
@ -5,11 +25,6 @@ export interface SimpleIcon {
|
||||
path: string;
|
||||
source: string;
|
||||
hex: string;
|
||||
guidelines?: string | undefined;
|
||||
license?:
|
||||
| {
|
||||
type: string;
|
||||
url: string;
|
||||
}
|
||||
| undefined;
|
||||
guidelines: string | undefined;
|
||||
license: License | undefined;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user