misc: JSON.parse 중 any인 것에 type 지정
This commit is contained in:
+2
-2
@@ -456,12 +456,12 @@ const inheritRequiredPoint = computed(() => {
|
|||||||
|
|
||||||
const toggleZoom = ref(true);
|
const toggleZoom = ref(true);
|
||||||
|
|
||||||
const displayTable = ref(JSON.parse(localStorage.getItem(`conf.${serverID}.join.displayTable`) ?? "true"));
|
const displayTable = ref<boolean>(JSON.parse(localStorage.getItem(`conf.${serverID}.join.displayTable`) ?? "true"));
|
||||||
watch(displayTable, (newValue: boolean) => {
|
watch(displayTable, (newValue: boolean) => {
|
||||||
localStorage.setItem(`conf.${serverID}.join.displayTable`, JSON.stringify(newValue));
|
localStorage.setItem(`conf.${serverID}.join.displayTable`, JSON.stringify(newValue));
|
||||||
});
|
});
|
||||||
|
|
||||||
const displayInherit = ref(JSON.parse(localStorage.getItem(`conf.${serverID}.join.displayInherit`) ?? "true"));
|
const displayInherit = ref<boolean>(JSON.parse(localStorage.getItem(`conf.${serverID}.join.displayInherit`) ?? "true"));
|
||||||
watch(displayInherit, (newValue: boolean) => {
|
watch(displayInherit, (newValue: boolean) => {
|
||||||
localStorage.setItem(`conf.${serverID}.join.displayInherit`, JSON.stringify(newValue));
|
localStorage.setItem(`conf.${serverID}.join.displayInherit`, JSON.stringify(newValue));
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -418,7 +418,7 @@ async function submitBet(): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const bettingID = bettingInfo.id;
|
const bettingID = bettingInfo.id;
|
||||||
const bettingType = JSON.parse(pickedBetTypeKey.value);
|
const bettingType = JSON.parse(pickedBetTypeKey.value) as number[];
|
||||||
const amount = betPoint.value;
|
const amount = betPoint.value;
|
||||||
try {
|
try {
|
||||||
await SammoAPI.Betting.Bet({
|
await SammoAPI.Betting.Bet({
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ function getToken(): [number, string] | undefined {
|
|||||||
if (!trialToken) {
|
if (!trialToken) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const tokenItems = JSON.parse(trialToken);
|
const tokenItems = JSON.parse(trialToken) as [number, [number, string], string];
|
||||||
if (tokenItems[0] != TOKEN_VERSION) {
|
if (tokenItems[0] != TOKEN_VERSION) {
|
||||||
console.log(tokenItems);
|
console.log(tokenItems);
|
||||||
resetToken();
|
resetToken();
|
||||||
|
|||||||
Reference in New Issue
Block a user