9 class?: string;
10 onClick?: () => void;
11}
12export const Button = ({ onClick, draggable, translate, ...props }: IProps) => {13 const ref = useShoelaceEventListener<HTMLButtonElement>(onClick, 'click', 'touch');
14 return (
15 <sl-button
9 class?: string;
10 onClick?: () => void;
11}
12export const Button = ({ onClick, draggable, translate, ...props }: IProps) => {13 const ref = useShoelaceEventListener<HTMLButtonElement>(onClick, 'click', 'touch');
14 return (
15 <sl-button
1import React, { DOMAttributes } from 'react'; 2import './skeleton.module.scss';
3import type { SlSkeleton } from '@shoelace-style/shoelace';
4import { CustomElement } from '@site/src/utils/customElement';
1import React, { DOMAttributes } from 'react'; 2// import './menu-item.module.scss';
3import type { SlMenuItem } from '@shoelace-style/shoelace';
4import { CustomElement } from '@site/src/utils/customElement';
2import type { ProcessedImage, Size, UploadedImage, UpscaleChoice } from '../types';
3import { getHTMLImageElement } from '../utils/getHTMLImageElement';
4import { getRecommendedImageSize } from '../utils/getRecommendedImageSize';
5import { removeAlpha } from '../utils/removeAlpha'; 6import { resizeImage } from '../utils/resizeImage';
7import { useAppropriateImage } from './useAppropriateImage';
8import { useUpscaler } from './useUpscaler';
Unused variables are generally considered a code smell and should be avoided.
Removing unused references - It prevents unused modules from being loaded at runtime, improving performance, and preventing the compiler from loading metadata that will never be used. - It prevents conflicts that may occur when trying to reference another variable.
NOTE: If you have intentionally left a variable unused, we suggest you to prefix the variable name with a _
to prevent them from being flagged by DeepSource.
import fs from 'fs' // <- unused
import { readFileSync } from 'fs'
const text = readFileSync('declaration_of_independence.txt', 'utf-8')
console.log(text)
import { readFileSync } from 'fs'
const text = readFileSync('declaration_of_independence.txt', 'utf-8')
console.log(text)