Skip to content

Commit 2daf8bc

Browse files
Copilothotlong
andcommitted
Fix build by adding project references and type annotations
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 1fb38a5 commit 2daf8bc

5 files changed

Lines changed: 14 additions & 4 deletions

File tree

packages/foundation/core/src/query/filter-translator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ export class FilterTranslator {
4949

5050
// Process logical operators first
5151
if (filter.$and) {
52-
const andNodes = filter.$and.map(f => this.convertToNode(f));
52+
const andNodes = filter.$and.map((f: Filter) => this.convertToNode(f));
5353
nodes.push(...this.interleaveWithOperator(andNodes, 'and'));
5454
}
5555

5656
if (filter.$or) {
57-
const orNodes = filter.$or.map(f => this.convertToNode(f));
57+
const orNodes = filter.$or.map((f: Filter) => this.convertToNode(f));
5858
if (nodes.length > 0) {
5959
nodes.push('and');
6060
}

packages/foundation/core/src/repository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ export class ObjectRepository {
243243
const results = kernelResult.value;
244244

245245
// Evaluate formulas for each result
246-
const resultsWithFormulas = results.map(record => this.evaluateFormulas(record));
246+
const resultsWithFormulas = results.map((record: any) => this.evaluateFormulas(record));
247247

248248
hookCtx.result = resultsWithFormulas;
249249
await this.app.triggerHook('afterFind', this.objectName, hookCtx);

packages/foundation/core/tsconfig.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,10 @@
1111
// Exclude external @objectstack/objectql package that has type incompatibilities
1212
// with our stub packages during migration phase
1313
"../../../node_modules/@objectstack+objectql"
14+
],
15+
"references": [
16+
{ "path": "../../objectstack/spec" },
17+
{ "path": "../../objectstack/runtime" },
18+
{ "path": "../types" }
1419
]
1520
}

packages/foundation/types/tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@
55
"rootDir": "./src"
66
},
77
"include": ["src/**/*"],
8-
"references": []
8+
"references": [
9+
{ "path": "../../objectstack/spec" },
10+
{ "path": "../../objectstack/runtime" }
11+
]
912
}

tsconfig.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
22
"files": [],
33
"references": [
4+
{ "path": "./packages/objectstack/spec" },
5+
{ "path": "./packages/objectstack/runtime" },
46
{ "path": "./packages/foundation/types" },
57
{ "path": "./packages/foundation/core" },
68
{ "path": "./packages/drivers/mongo" },

0 commit comments

Comments
 (0)