فهرست منبع

improve Ref type

Yuki Takei 4 سال پیش
والد
کامیت
f94032c042
2فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 3 1
      packages/app/src/interfaces/common.ts
  2. 1 1
      packages/app/src/interfaces/page.ts

+ 3 - 1
packages/app/src/interfaces/common.ts

@@ -2,6 +2,8 @@
  * Common types and interfaces
  */
 
+import { HasObjectId } from './has-object-id';
+
 
 // Foreign key field
-export type Ref<T> = string | T;
+export type Ref<T> = string | T & HasObjectId;

+ 1 - 1
packages/app/src/interfaces/page.ts

@@ -9,7 +9,7 @@ import { SubscriptionStatusType } from './subscription';
 export interface IPage {
   path: string,
   status: string,
-  revision: Ref<IRevision & HasObjectId>,
+  revision: Ref<IRevision>,
   tags: Ref<ITag>[],
   creator: Ref<IUser>,
   createdAt: Date,