АЗ
но когда устанавливаешь
npm i -D @types/react-routerставятся типы под последнюю версию(5)
Size: a a a
АЗ
npm i -D @types/react-routerставятся типы под последнюю версию(5)
m
AK
A
ТФ
arr.map(el => +el);
ЗП
arr.map(el => parseInt(el, 10))
PS
arr.map(el => parseInt(el, 10))
ЗП
ЗП
РФ
PS
Г
const locations: (...args: any[]) => Promise<IPaginatedResponse<TLocationContent[]>>В третьем консоль логе тс видит результат резолва промиса, показывая
<IpaginatedResponse<TLocationContent[]>>1. Как тс определяет, что возвращается из метода, ведь я никуда не передаю дженерики?
(...args: any[])
он показывал TPaginationParams
Ищу ментора кто бы мог консультировать по ТС + React, в том числе по этой проблеме, могу оплатить 2к в часE
АК
export const themes = {
themeDark: 'theme-dark',
themeLight: 'theme-light',
};
export const changeTheme = (theme: string) => {
ТФ
export const themes = {
themeDark: 'theme-dark',
themeLight: 'theme-light',
};
export const changeTheme = (theme: string) => {
export const changeTheme = (theme: "themeDark" | "themeLight") => {...}
V
АК