Skip to content

Commit 43278ac

Browse files
committed
type: Remove outdated type casts
1 parent 96bef4d commit 43278ac

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/schema/associations.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,18 +102,12 @@ export async function buildAssociations(
102102
const associations: Associations = {}
103103

104104
const schema: MetaSchema = context.dataset.schema as MetaSchema
105-
// Augment rule type with an entities field that should be present in BIDS 1.10.1+
106-
type ruleType = MetaSchema['meta']['associations'][keyof MetaSchema['meta']['associations']]
107-
type AugmentedRuleType = ruleType & {
108-
target: ruleType['target'] & { entities?: string[] }
109-
}
110105

111106
Object.assign(context, expressionFunctions)
112107
// @ts-expect-error
113108
context.exists.bind(context)
114109

115-
for (const key of Object.keys(schema.meta.associations)) {
116-
const rule = schema.meta.associations[key] as AugmentedRuleType
110+
for (const [key, rule] of Object.entries(schema.meta.associations)) {
117111
if (!rule.selectors!.every((x) => evalCheck(x, context))) {
118112
continue
119113
}

0 commit comments

Comments
 (0)