Inherited properties will not be found when default-imported.
it("supports inheritance of classes on default export/import", (done) => {
let base = `
export default class Base{
value:string;
}`;
let viewmodel = `
import Base from './base
export class Foo extends Base{
}`;
let view = `
<template>
\${value}
\${valu}
</template>`;
let reflection = new Reflection();
let rule = new BindingRule(reflection, new AureliaReflection());
let linter = new Linter([rule]);
reflection.add("./foo.ts", viewmodel);
reflection.add("./base.ts", base);
linter.lint(view, "./foo.html")
.then((issues) => {
try {
expect(issues.length).toBe(1);
expect(issues[0].message).toBe("cannot find 'valu' in type 'Foo'");
}
catch (err) { fail(err); }
finally { done(); }
});
});
Inherited properties will not be found when default-imported.