Remove or exempt all uses of 'any

* Refactored LocalForage
* Refactored SceneFilenameParser
This commit is contained in:
Infinite
2020-02-13 19:54:37 +01:00
parent a60c89ceb1
commit cdadb66d85
43 changed files with 671 additions and 677 deletions

View File

@@ -1,6 +1,6 @@
import ApolloClient from "apollo-client";
import { WebSocketLink } from "apollo-link-ws";
import { InMemoryCache } from "apollo-cache-inmemory";
import { InMemoryCache, NormalizedCacheObject } from "apollo-cache-inmemory";
import { HttpLink } from "apollo-link-http";
import { split } from "apollo-link";
import { getMainDefinition } from "apollo-utilities";
@@ -8,7 +8,7 @@ import { ListFilterModel } from "../models/list-filter/filter";
import * as GQL from "./generated-graphql";
export class StashService {
public static client: ApolloClient<any>;
public static client: ApolloClient<NormalizedCacheObject>;
private static cache: InMemoryCache;
public static initialize() {
@@ -60,12 +60,13 @@ export class StashService {
cache: StashService.cache
});
(window as any).StashService = StashService;
return StashService.client;
}
// TODO: Invalidation should happen through apollo client, rather than rewriting cache directly
private static invalidateQueries(queries: string[]) {
if (StashService.cache) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const cache = StashService.cache as any;
const keyMatchers = queries.map(query => {
return new RegExp(`^${query}`);