Skip to content

Commit a2dd3ba

Browse files
committed
fix: use 'as any' for MongoDB deep property notation
Replaces unused @ts-expect-error directives with type assertions for MongoDB projections/indexes that use dot-notation ('part._id').
1 parent 9270607 commit a2dd3ba

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

meteor/server/api/deviceTriggers/triggersContext.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,9 @@ async function fetchInfoForSelectedPart(partInfo: SelectedPartInstance | null):
159159

160160
const partInstance = (await PartInstances.findOneAsync(partInfo.partInstanceId, {
161161
projection: {
162-
// @ts-expect-error deep property
163162
'part._id': 1,
164163
segmentId: 1,
165-
},
164+
} as any,
166165
})) as (Pick<DBPartInstance, 'segmentId'> & { part: Pick<DBPart, '_id'> }) | null
167166

168167
if (!partInstance) return null

meteor/server/collections/rundown.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,10 @@ registerIndex(PartInstances, {
6868
})
6969
registerIndex(PartInstances, {
7070
rundownId: 1,
71-
// @ts-expect-error deep property
7271
'part._id': 1,
7372
takeCount: 1,
7473
reset: 1,
75-
})
74+
} as any)
7675

7776
export const Parts = createAsyncOnlyReadOnlyMongoCollection<DBPart>(CollectionName.Parts)
7877
registerIndex(Parts, {

0 commit comments

Comments
 (0)