fix the last of the type annotations (still have to fix no-explicit-any warnings)
This commit is contained in:
@@ -112,12 +112,12 @@ export function didInfo(
|
||||
}
|
||||
}
|
||||
|
||||
interface SuccessResult {
|
||||
export interface SuccessResult {
|
||||
type: "success";
|
||||
response: AxiosResponse<ClaimResult>;
|
||||
}
|
||||
|
||||
interface ErrorResult {
|
||||
export interface ErrorResult {
|
||||
type: "error";
|
||||
error: InternalError;
|
||||
}
|
||||
|
||||
@@ -89,6 +89,7 @@ import { accessToken } from "@/libs/crypto";
|
||||
import {
|
||||
createAndSubmitGive,
|
||||
CreateAndSubmitGiveResult,
|
||||
ErrorResult,
|
||||
GiverInputInfo,
|
||||
GiverOutputInfo,
|
||||
} from "@/libs/endorserServer";
|
||||
@@ -96,7 +97,6 @@ import { Contact } from "@/db/tables/contacts";
|
||||
import QuickNav from "@/components/QuickNav.vue";
|
||||
import EntityIcon from "@/components/EntityIcon.vue";
|
||||
import { IIdentifier } from "@veramo/core";
|
||||
import { RawAxiosRequestHeaders } from "axios";
|
||||
|
||||
interface Notification {
|
||||
group: string;
|
||||
@@ -154,7 +154,7 @@ export default class HomeView extends Vue {
|
||||
this.apiServer = settings?.apiServer || "";
|
||||
this.activeDid = settings?.activeDid || "";
|
||||
this.allContacts = await db.contacts.toArray();
|
||||
} catch (err: unknown) {
|
||||
} catch (err: any) {
|
||||
this.$notify(
|
||||
{
|
||||
group: "alert",
|
||||
@@ -170,7 +170,7 @@ export default class HomeView extends Vue {
|
||||
}
|
||||
|
||||
openDialog(giver: GiverInputInfo) {
|
||||
this.$refs.customDialog.open(giver);
|
||||
(this.$refs.customDialog as GiftedDialog).open(giver);
|
||||
}
|
||||
|
||||
handleDialogResult(result: GiverOutputInfo) {
|
||||
@@ -284,7 +284,7 @@ export default class HomeView extends Vue {
|
||||
}
|
||||
|
||||
getGiveCreationErrorMessage(result: CreateAndSubmitGiveResult) {
|
||||
return result.error?.userMessage;
|
||||
return (result as ErrorResult).error?.userMessage;
|
||||
}
|
||||
|
||||
getGiveErrorMessage(error: any) {
|
||||
|
||||
@@ -185,6 +185,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { LeafletMouseEvent } from "leaflet";
|
||||
import "leaflet/dist/leaflet.css";
|
||||
import { Component, Vue } from "vue-facing-decorator";
|
||||
import {
|
||||
@@ -202,7 +203,6 @@ import { didInfo, ProjectData } from "@/libs/endorserServer";
|
||||
import QuickNav from "@/components/QuickNav.vue";
|
||||
import InfiniteScroll from "@/components/InfiniteScroll.vue";
|
||||
import EntityIcon from "@/components/EntityIcon.vue";
|
||||
import { RawAxiosRequestHeaders } from "axios";
|
||||
|
||||
const DEFAULT_LAT_LONG_DIFF = 0.01;
|
||||
const WORLD_ZOOM = 2;
|
||||
@@ -337,7 +337,7 @@ export default class DiscoverView extends Vue {
|
||||
} else {
|
||||
throw JSON.stringify(results);
|
||||
}
|
||||
} catch (e) {
|
||||
} catch (e: any) {
|
||||
console.log("Error with feed load:", e);
|
||||
this.$notify(
|
||||
{
|
||||
@@ -415,7 +415,7 @@ export default class DiscoverView extends Vue {
|
||||
} else {
|
||||
throw JSON.stringify(results);
|
||||
}
|
||||
} catch (e) {
|
||||
} catch (e: any) {
|
||||
console.log("Error with feed load:", e);
|
||||
this.$notify(
|
||||
{
|
||||
@@ -458,7 +458,7 @@ export default class DiscoverView extends Vue {
|
||||
this.$router.push(route);
|
||||
}
|
||||
|
||||
setMapPoint(event) {
|
||||
setMapPoint(event: LeafletMouseEvent) {
|
||||
if (this.isNewMarkerSet) {
|
||||
this.localLatDiff = Math.abs(event.latlng.lat - this.localCenterLat);
|
||||
this.localLongDiff = Math.abs(event.latlng.lng - this.localCenterLong);
|
||||
|
||||
@@ -216,7 +216,6 @@ import { Contact } from "@/db/tables/contacts";
|
||||
import QuickNav from "@/components/QuickNav.vue";
|
||||
import EntityIcon from "@/components/EntityIcon.vue";
|
||||
import { IIdentifier } from "@veramo/core";
|
||||
import { RawAxiosRequestHeaders } from "axios";
|
||||
|
||||
interface Notification {
|
||||
group: string;
|
||||
@@ -285,7 +284,7 @@ export default class HomeView extends Vue {
|
||||
this.allContacts = await db.contacts.toArray();
|
||||
this.feedLastViewedId = settings?.lastViewedClaimId;
|
||||
this.updateAllFeed();
|
||||
} catch (err) {
|
||||
} catch (err: any) {
|
||||
this.$notify(
|
||||
{
|
||||
group: "alert",
|
||||
@@ -425,7 +424,7 @@ export default class HomeView extends Vue {
|
||||
}
|
||||
|
||||
openDialog(giver: GiverInputInfo) {
|
||||
this.$refs.customDialog.open(giver);
|
||||
(this.$refs.customDialog as GiftedDialog).open(giver);
|
||||
}
|
||||
|
||||
handleDialogResult(result: GiverOutputInfo) {
|
||||
|
||||
@@ -279,11 +279,8 @@ export default class NewEditProjectView extends Vue {
|
||||
resp.data.success.handleId || resp.data.success.fullIri,
|
||||
);
|
||||
setTimeout(
|
||||
function (that: Vue) {
|
||||
const route = {
|
||||
name: "project",
|
||||
};
|
||||
that.$router.push(route);
|
||||
function (that: NewEditProjectView) {
|
||||
that.$router.push({ name: "project" });
|
||||
},
|
||||
2000,
|
||||
this,
|
||||
|
||||
Reference in New Issue
Block a user