Skip to content

Commit faad912

Browse files
Copilothotlong
andcommitted
docs: Add TODO comments and improve documentation for type assertions
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent adf7365 commit faad912

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

packages/foundation/core/src/repository.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ export class ObjectRepository {
5757
}
5858

5959
// Backward compatibility: if it's already an array (old format), convert to FilterNode
60+
// TODO: This uses type assertion because the old code used arrays for filters
61+
// but FilterNode is now an object-based AST. This should be properly converted
62+
// to build FilterNode objects in a future refactoring.
6063
if (Array.isArray(filters)) {
6164
return filters as unknown as FilterNode;
6265
}
@@ -128,6 +131,9 @@ export class ObjectRepository {
128131
}
129132
}
130133

134+
// TODO: This returns an array but FilterNode is now an object-based AST.
135+
// This type assertion is temporary for backward compatibility. Should be
136+
// refactored to build proper FilterNode objects with type/operator/children.
131137
return (nodes.length === 1 ? nodes[0] : nodes) as unknown as FilterNode;
132138
}
133139

packages/foundation/core/tsconfig.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@
55
"rootDir": "src"
66
},
77
"include": ["src/**/*"],
8-
"exclude": ["node_modules", "dist", "../../../node_modules/@objectstack+objectql"],
8+
"exclude": [
9+
"node_modules",
10+
"dist",
11+
// Exclude external @objectstack/objectql package that has type incompatibilities
12+
// with our stub packages during migration phase
13+
"../../../node_modules/@objectstack+objectql"
14+
],
915
"references": [
1016
{ "path": "../types" }
1117
]

packages/objectstack/spec/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,12 @@ export interface App {
257257

258258
/**
259259
* ObjectStack Manifest
260+
* Configuration manifest for ObjectStack applications
260261
*/
261262
export interface ObjectStackManifest {
262263
/** Manifest version */
263264
version: string;
264-
/** Manifest ID */
265+
/** Unique identifier for the manifest (optional) */
265266
id?: string;
266267
/** Application info */
267268
app?: App;

0 commit comments

Comments
 (0)