Skip to content

Commit 56ebf52

Browse files
committed
type: Remove outdated type casts
1 parent e0e9b0b commit 56ebf52

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
@@ -104,18 +104,12 @@ export async function buildAssociations(
104104
const associations: Associations = {}
105105

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

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

117-
for (const key of Object.keys(schema.meta.associations)) {
118-
const rule = schema.meta.associations[key] as AugmentedRuleType
112+
for (const [key, rule] of Object.entries(schema.meta.associations)) {
119113
if (!rule.selectors!.every((x) => evalCheck(x, context))) {
120114
continue
121115
}

0 commit comments

Comments
 (0)