1import { createSlice, PayloadAction } from '@reduxjs/toolkit'
2import { PostTypes } from '../interfaces' 3
4interface ChannelInterface {
5 channel: string
20 page: number
21 products: Product[]
22}
23interface OneProductResponse { 24 product: Product
25}
26
10import { RootState } from '../store'
11import { ProductPostsResponse } from '../interfaces'
12import { number } from 'prop-types'
13import Posts from '../../components/Products/Home/Posts/Posts' 14interface ProductSearch {
15 name?: string
16 field?: string
9} from '../interfaces'
10import { RootState } from '../store'
11import { ProductPostsResponse } from '../interfaces'
12import { number } from 'prop-types' 13import Posts from '../../components/Products/Home/Posts/Posts'
14interface ProductSearch {
15 name?: string
7 Post,
8 UserInfo,
9} from '../interfaces'
10import { RootState } from '../store' 11import { ProductPostsResponse } from '../interfaces'
12import { number } from 'prop-types'
13import Posts from '../../components/Products/Home/Posts/Posts'
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)