АB
if (checkEmail(email)) {
AuthStore.login(tokenId, {
firstName: givenName,
email: email,
role: USER_ROLES[userRole.toUpperCase()],
id: userId
});
}
Size: a a a
АB
if (checkEmail(email)) {
AuthStore.login(tokenId, {
firstName: givenName,
email: email,
role: USER_ROLES[userRole.toUpperCase()],
id: userId
});
}
r
if (checkEmail(email)) {
AuthStore.login(tokenId, {
firstName: givenName,
email: email,
role: USER_ROLES[userRole.toUpperCase()],
id: userId
});
}
АB
interface TUser {
firstName: string;
email: string;
role: number;
id: number;
}
login(token: string, user: TUser) {
…
},
SV
MS
interface TUser {
firstName: string;
email: string;
role: number;
id: number;
}
login(token: string, user: TUser) {
…
},
MS
r
{
role: USER_ROLES[userRole.toUpperCase()],
}
TS7053: Element implicitly has ‘any’ type because expression of type ‘any’ can’t be used to index type { SUPER_ADMIN: number; ADMIN: number; … }не могу понять как исправить проблему
АB
export const USER_ROLES = {
SUPER_ADMIN: 0,
ADMIN: 1,
};
MS
export const USER_ROLES = {
SUPER_ADMIN: 0,
ADMIN: 1,
};
MS
r
export const USER_ROLES = {
SUPER_ADMIN: 0,
ADMIN: 1,
};
MS
АB
MS
S
BB
S
BB
BB
S