agama/web/custom.d.ts
David Díaz González e02c3a2c36 refactor(web): migrate some files to TypeScript
More specifically, the .js or .jsx files touched in previous commits for
https://github.com/agama-project/agama/pull/1690.

Apart from the expected changes to make the migration possible, there
were two changes that worth a remark:

  * Make optional `description` and `icon` for the software/Product
    type.
  * Add the `custom.d.ts` file and make tsconfig.json file aware of it
    in order to avoid TypeScript complaints in the src/layout/Icon.ts
    file because missing types in the icons library. To know more read
    https://webpack.js.org/guides/typescript/#importing-other-assets
2024-10-27 23:04:25 +00:00

31 lines
1.1 KiB
TypeScript

/*
* Copyright (c) [2024] SUSE LLC
*
* All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, contact SUSE LLC.
*
* To contact SUSE LLC about this file by physical or electronic mail, you may
* find current contact information at www.suse.com.
*/
declare module "*.svg" {
const content: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
export default content;
}
declare module "*.svg?component" {
const content: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
export default content;
}