There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
fix: error TS2742: The inferred type of 'bareClient' cannot be name (#731)
zuomeng wangba9a57d4ae1f
diff --git a/packages/data-center/src/provider/affine/apis/request.ts b/packages/data-center/src/provider/affine/apis/request.tsindex 2520b1d535..c5bdf7e300 100644--- a/packages/data-center/src/provider/affine/apis/request.ts+++ b/packages/data-center/src/provider/affine/apis/request.ts@@ -2,11 +2,13 @@ import ky from 'ky-universal';import { MessageCenter } from '../../../message/index.js';import { token } from './token.js';+type KyInstance = typeof ky;+const messageCenter = MessageCenter.getInstance();const _sendMessage = messageCenter.getMessageSender('affine');-export const bareClient = ky.extend({+export const bareClient: KyInstance = ky.extend({prefixUrl: 'http://localhost:8080',retry: 1,hooks: {@@ -26,7 +28,7 @@ export const bareClient = ky.extend({},});-export const client = bareClient.extend({+export const client: KyInstance = bareClient.extend({hooks: {beforeRequest: [async request => {