You've already forked simple-icons
mirror of
https://github.com/simple-icons/simple-icons.git
synced 2025-11-23 21:34:49 +02:00
Resolve all possible TODO comments (#11119)
This commit is contained in:
committed by
GitHub
parent
236f5fc715
commit
512e4cbf4a
@@ -98,19 +98,21 @@ const TESTS = {
|
||||
|
||||
const allUrlFields = [
|
||||
...new Set(
|
||||
data.icons
|
||||
.flatMap((icon) => {
|
||||
// TODO: `Omit` is not working smoothly here
|
||||
const license =
|
||||
// @ts-ignore
|
||||
icon.license && icon.license.url
|
||||
? // @ts-ignore
|
||||
[icon.license.url]
|
||||
: [];
|
||||
return [icon.source, icon.guidelines, ...license];
|
||||
})
|
||||
|
||||
.filter(Boolean),
|
||||
data.icons.flatMap((icon) => {
|
||||
/** @type {string[]} */
|
||||
const license =
|
||||
icon.license !== undefined && Object.hasOwn(icon.license, 'url')
|
||||
? [
|
||||
// TODO: `hasOwn` is not currently supported by TS.
|
||||
// See https://github.com/microsoft/TypeScript/issues/44253
|
||||
/** @type {string} */
|
||||
// @ts-ignore
|
||||
icon.license.url,
|
||||
]
|
||||
: [];
|
||||
const guidelines = icon.guidelines ? [icon.guidelines] : [];
|
||||
return [icon.source, ...guidelines, ...license];
|
||||
}),
|
||||
),
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user