mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-23 21:38:44 +08:00
chore: standardize tsconfig (#9568)
This commit is contained in:
Vendored
+32
@@ -0,0 +1,32 @@
|
||||
declare interface BUILD_CONFIG_TYPE {
|
||||
debug: boolean;
|
||||
distribution: 'web' | 'desktop' | 'admin' | 'mobile' | 'ios' | 'android';
|
||||
/**
|
||||
* 'web' | 'desktop' | 'admin'
|
||||
*/
|
||||
isDesktopEdition: boolean;
|
||||
/**
|
||||
* 'mobile'
|
||||
*/
|
||||
isMobileEdition: boolean;
|
||||
|
||||
isElectron: boolean;
|
||||
isWeb: boolean;
|
||||
isMobileWeb: boolean;
|
||||
isIOS: boolean;
|
||||
isAndroid: boolean;
|
||||
isAdmin: boolean;
|
||||
|
||||
appVersion: string;
|
||||
editorVersion: string;
|
||||
appBuildType: 'stable' | 'beta' | 'internal' | 'canary';
|
||||
|
||||
githubUrl: string;
|
||||
changelogUrl: string;
|
||||
downloadUrl: string;
|
||||
// see: tools/workers
|
||||
imageProxyUrl: string;
|
||||
linkPreviewUrl: string;
|
||||
}
|
||||
|
||||
declare var BUILD_CONFIG: BUILD_CONFIG_TYPE;
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "@types/build-config",
|
||||
"private": true,
|
||||
"types": "./__all.d.ts",
|
||||
"type": "module",
|
||||
"version": "0.19.0"
|
||||
}
|
||||
Vendored
+34
-20
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user