Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static create(args: { attrs: Attrs }): EmberishCurlyComponent {
let c = new this();
for (let key of keys(args)) {
c[key] = args[key];
}
return c;
}
setProperties(dict: Dict) {
for (let key of keys(dict)) {
(this as Dict)[key] = dict[key];
}
SELF_REF.get(this)!.dirty();
this.dirtinessTag.inner.dirty();
}
static create({ attrs: args }: EmberishGlimmerArgs): EmberishGlimmerComponent {
let c = new this({ attrs: args });
for (let key of keys(args)) {
(c as any)[key] = args[key];
}
return c;
}
function nestedComponentModules(
klass: RenderTestConstructor,
tests: ComponentTests
): void {
keys(tests).forEach(type => {
let formattedType = `${type[0].toUpperCase() + type.slice(1)}`;
QUnit.module(`[integration] ${formattedType}`, () => {
for (let i = tests[type].length - 1; i >= 0; i--) {
let t = tests[type][i];
t(formattedType, klass);
tests[type].pop();
}
});
});
}
export function hash(map: { [key: string]: Expression }): Hash {
let out: HashPair[] = [];
for (let key of keys(map)) {
out.push({ key: key as string, value: map[key] });
}
return { pairs: out };
}