mirror of
https://github.com/samuelthomas2774/nxapi.git
synced 2026-04-07 10:05:18 -05:00
Fix type errors
This commit is contained in:
parent
445093e58a
commit
02faac2782
|
|
@ -236,7 +236,7 @@ export async function genf(
|
|||
|
||||
if ('error' in data) {
|
||||
debugZncaApi('Error getting f parameter "%s"', data.error);
|
||||
throw new ErrorResponse<AndroidZncaFError>('[znca-api] ' + data.error_message ?? data.error, response, data);
|
||||
throw new ErrorResponse<AndroidZncaFError>('[znca-api] ' + (data.error_message ?? data.error), response, data);
|
||||
}
|
||||
|
||||
debugZncaApi('Got f parameter', data, response.headers);
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ export async function getNintendoAccountSessionToken(code: string, verifier: str
|
|||
const token = await response.json() as NintendoAccountSessionToken | NintendoAccountAuthError | NintendoAccountError;
|
||||
|
||||
if ('error' in token) {
|
||||
throw new NintendoAccountAuthErrorResponse('[na] ' + token.error_description ?? token.error, response, token);
|
||||
throw new NintendoAccountAuthErrorResponse('[na] ' + (token.error_description ?? token.error), response, token);
|
||||
}
|
||||
if ('errorCode' in token) {
|
||||
throw new NintendoAccountErrorResponse('[na] ' + token.detail, response, token);
|
||||
|
|
@ -170,8 +170,8 @@ export async function getNintendoAccountToken(token: string, client_id: string)
|
|||
const nintendoAccountToken = await response.json() as NintendoAccountToken | NintendoAccountAuthError | NintendoAccountError;
|
||||
|
||||
if ('error' in nintendoAccountToken) {
|
||||
throw new NintendoAccountAuthErrorResponse('[na] ' + nintendoAccountToken.error_description ??
|
||||
nintendoAccountToken.error, response, nintendoAccountToken);
|
||||
throw new NintendoAccountAuthErrorResponse('[na] ' + (nintendoAccountToken.error_description ??
|
||||
nintendoAccountToken.error), response, nintendoAccountToken);
|
||||
}
|
||||
if ('errorCode' in nintendoAccountToken) {
|
||||
throw new NintendoAccountErrorResponse('[na] ' + nintendoAccountToken.detail, response, nintendoAccountToken);
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ function ButtonMac(props: {
|
|||
|
||||
const styles_mac = StyleSheet.create({
|
||||
button: {
|
||||
// @ts-expect-error react-native-web
|
||||
cursor: 'default',
|
||||
lineHeight: 19,
|
||||
borderRadius: 3,
|
||||
|
|
@ -63,6 +64,7 @@ const styles_mac = StyleSheet.create({
|
|||
},
|
||||
buttonLight: {
|
||||
backgroundColor: '#ffffff',
|
||||
// @ts-expect-error react-native-web
|
||||
boxShadow: '#0000008a 0px 0px 1px',
|
||||
},
|
||||
|
||||
|
|
@ -76,10 +78,12 @@ const styles_mac = StyleSheet.create({
|
|||
},
|
||||
innerActive: {
|
||||
backgroundColor: 'transparent',
|
||||
// @ts-expect-error react-native-web
|
||||
backgroundImage: 'linear-gradient(0deg, #00000050, #00000040)',
|
||||
},
|
||||
innerPressed: {
|
||||
backgroundColor: 'transparent',
|
||||
// @ts-expect-error react-native-web
|
||||
backgroundImage: 'linear-gradient(0deg, #00000040, #00000020)',
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ export default function FriendCode(props: {
|
|||
|
||||
const styles = StyleSheet.create({
|
||||
friendCodeValue: {
|
||||
// @ts-expect-error
|
||||
userSelect: 'all',
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ export function NintendoSwitchUsers(props: {
|
|||
const styles = StyleSheet.create({
|
||||
userImage: {
|
||||
borderRadius: 8,
|
||||
verticalAlign: -3,
|
||||
// @ts-expect-error react-native-web
|
||||
verticalAlign: -3 as 'auto',
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user