From a1c45294b3b074225f0fc448acc967936f3aa49d Mon Sep 17 00:00:00 2001
From: Sourabh Desai <sourabhdesai@gmail.com>
Date: Tue, 4 Jul 2023 05:55:51 +0000
Subject: [PATCH] updates for compilation errors

---
 apps/simple/listIndex.ts       | 4 +++-
 packages/core/src/BaseIndex.ts | 9 ++++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/apps/simple/listIndex.ts b/apps/simple/listIndex.ts
index 5e03cfa01..5b7a5203b 100644
--- a/apps/simple/listIndex.ts
+++ b/apps/simple/listIndex.ts
@@ -12,4 +12,6 @@ async function main() {
   console.log(response.toString());
 }
 
-main().catch(console.error);
+main().catch((e: Error) => {
+  console.error(e, e.stack);
+});
diff --git a/packages/core/src/BaseIndex.ts b/packages/core/src/BaseIndex.ts
index d8512f1b6..f6e099eeb 100644
--- a/packages/core/src/BaseIndex.ts
+++ b/packages/core/src/BaseIndex.ts
@@ -88,9 +88,16 @@ export interface VectorIndexOptions {
   storageContext?: StorageContext;
 }
 
+interface VectorIndexConstructorProps extends BaseIndexInit<IndexDict> {
+  vectorStore: VectorStore;
+}
+
 export class VectorStoreIndex extends BaseIndex<IndexDict> {
-  private constructor(init: BaseIndexInit<IndexDict>) {
+  vectorStore: VectorStore;
+
+  private constructor(init: VectorIndexConstructorProps) {
     super(init);
+    this.vectorStore = init.vectorStore;
   }
 
   static async init(options: VectorIndexOptions): Promise<VectorStoreIndex> {
-- 
GitLab