@Prop with type of an interface ends up in an typescript error
LutzStrobel opened this issue · 2 comments
LutzStrobel commented
I have an interface like that:
export default interface PostRecord{
...
}
and a component like this:
export class Container implements ComponentInterface {
@prop record: PostRecord;
...
}
with a correct import of PostRecord.
Then the typescript compiler complains:
[ ERROR ] TypeScript: ./src/components.d.ts:29:19
[0] Cannot find name 'PostRecord'.
[0]
[0] L28: "active": boolean;
[0] L29: "record": PostRecord;
[0] L30: }
Is it possible to use interface types as property types or what is wrong with the picture?
Thank you for your help.
Lutz
yonaskolb commented
Hi @LutzStrobel. I think you posted to the wrong repo?
LutzStrobel commented
Really, the wrong repo.
Thanx