Code styling

Added brackets for const lambdas
Converted const lambdas with multiple instructions to functions
This commit is contained in:
2023-07-15 12:55:25 +03:00
parent 99d2b92b03
commit 0218cdced5
24 changed files with 106 additions and 69 deletions

View File

@ -9,8 +9,9 @@ import { ${NAME}Response, ${NAME} } from './types'
const initial${NAME}: ${NAME} = {}
const compose${NAME}URL = () =>
const compose${NAME}URL = () => (
API_URL + '/${NAME,}?'
)
const process${NAME} = (data: ${NAME}Response): ${NAME} => {
return data
@ -26,19 +27,21 @@ type ${NAME}Response = {
}
const is${NAME}Response = (obj: unknown): obj is ${NAME}Response =>
const is${NAME}Response = (obj: unknown): obj is ${NAME}Response => (
isObject(obj, {
})
)
type ${NAME} = {
}
const is${NAME} = (obj: unknown): obj is ${NAME} =>
const is${NAME} = (obj: unknown): obj is ${NAME} => (
isObject(obj, {
})
)
export type { ${NAME}Response, ${NAME} }