chore: standardize tsconfig (#9568)

This commit is contained in:
forehalo
2025-01-08 04:07:56 +00:00
parent 39f4b17315
commit c0ed74dfed
151 changed files with 1041 additions and 1566 deletions

View File

@@ -1,26 +1,6 @@
import '@affine/env/constant';
import '@blocksuite/affine/global/types'
import type { BUILD_CONFIG_TYPE, Environment } from '@affine/env/global';
declare global {
// eslint-disable-next-line no-var
var process: {
env: Record<string, string>;
};
// eslint-disable-next-line no-var
var environment: Environment;
// eslint-disable-next-line no-var
var BUILD_CONFIG: BUILD_CONFIG_TYPE;
// eslint-disable-next-line no-var
var $AFFINE_SETUP: boolean | undefined;
/**
* Inject by https://www.npmjs.com/package/@sentry/webpack-plugin
*/
// eslint-disable-next-line no-var
var SENTRY_RELEASE: { id: string } | undefined;
}
declare module '@blocksuite/affine/store' {
interface DocMeta {
/**
@@ -35,3 +15,37 @@ declare module '@blocksuite/affine/store' {
isPublic?: boolean;
}
}
declare global {
declare type Environment = {
// Variant
isSelfHosted: boolean;
// Device
isLinux: boolean;
isMacOs: boolean;
isIOS: boolean;
isSafari: boolean;
isWindows: boolean;
isFireFox: boolean;
isMobile: boolean;
isChrome: boolean;
isPwa: boolean;
chromeVersion?: number;
// runtime configs
publicPath: string;
};
var process: {
env: Record<string, string>;
};
var environment: Environment;
var $AFFINE_SETUP: boolean | undefined;
/**
* Inject by https://www.npmjs.com/package/@sentry/webpack-plugin
*/
var SENTRY_RELEASE: { id: string } | undefined;
}