mirror of https://github.com/sveltejs/svelte
14 lines
302 B
14 lines
302 B
import { Validator } from '../../';
|
|
import { Node } from '../../../interfaces';
|
|
|
|
export default function checkForComputedKeys(
|
|
validator: Validator,
|
|
properties: Node[]
|
|
) {
|
|
properties.forEach(prop => {
|
|
if (prop.key.computed) {
|
|
validator.error(`Cannot use computed keys`, prop.start);
|
|
}
|
|
});
|
|
}
|