mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-12 15:46:29 +08:00
e516e0db23
- [x] separates modules into `fundamental`, `core`, `plugins`
- [x] optional modules with `@OptionalModule` decorator to install modules with requirements met(`requires`, `if`)
- [x] `module.contributesTo` defines optional features that will be enabled if module registered
- [x] `AFFiNE.plugins.use('payment', {})` to enable a optional/plugin module
- [x] `PaymentModule` is the first plugin module
- [x] GraphQLSchema will not be generated for non-included modules
- [x] Frontend can use `ServerConfigType` query to detect which features are enabled
- [x] override existing provider globally
32 lines
612 B
TypeScript
32 lines
612 B
TypeScript
declare namespace Express {
|
|
interface Request {
|
|
user?: import('@prisma/client').User | null;
|
|
}
|
|
}
|
|
|
|
declare type PrimitiveType =
|
|
| string
|
|
| number
|
|
| boolean
|
|
| symbol
|
|
| null
|
|
| undefined;
|
|
|
|
declare type ConstructorOf<T> = {
|
|
new (): T;
|
|
};
|
|
|
|
declare type DeepPartial<T> = T extends Array<infer U>
|
|
? DeepPartial<U>[]
|
|
: T extends ReadonlyArray<infer U>
|
|
? ReadonlyArray<DeepPartial<U>>
|
|
: T extends object
|
|
? {
|
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
}
|
|
: T;
|
|
|
|
declare type AFFiNEModule =
|
|
| import('@nestjs/common').Type
|
|
| import('@nestjs/common').DynamicModule;
|