chore: More typescript FIXME's removed
This commit is contained in:
@@ -257,8 +257,7 @@ export default class DocumentsStore extends BaseStore<Document> {
|
||||
|
||||
this.backlinks.set(
|
||||
documentId,
|
||||
// @ts-expect-error ts-migrate(7006) FIXME: Parameter 'doc' implicitly has an 'any' type.
|
||||
data.map((doc) => doc.id)
|
||||
data.map((doc: Partial<Document>) => doc.id)
|
||||
);
|
||||
});
|
||||
};
|
||||
@@ -401,15 +400,13 @@ export default class DocumentsStore extends BaseStore<Document> {
|
||||
invariant(res && res.data, "Search response should be available");
|
||||
|
||||
// add the documents and associated policies to the store
|
||||
// @ts-expect-error ts-migrate(7006) FIXME: Parameter 'result' implicitly has an 'any' type.
|
||||
res.data.forEach((result) => this.add(result.document));
|
||||
res.data.forEach((result: SearchResult) => this.add(result.document));
|
||||
this.addPolicies(res.policies);
|
||||
|
||||
// store a reference to the document model in the search cache instead
|
||||
// of the original result from the API.
|
||||
const results: SearchResult[] = compact(
|
||||
// @ts-expect-error ts-migrate(7006) FIXME: Parameter 'result' implicitly has an 'any' type.
|
||||
res.data.map((result) => {
|
||||
res.data.map((result: SearchResult) => {
|
||||
const document = this.data.get(result.document.id);
|
||||
if (!document) return null;
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user