According to the meteor-typescript's definition file, the user.profile
is typed as any
.
Is there a Typescript method to extend the user object and modify the profile type?
I attempted the following:
interface IMyUserProfile {
foo: boolean;
}
namespace Meteor {
export interface User: {
profile: IMyUserProfile
}
}
However, TypeScript returns an error stating "duplicate identifier".
I am aware that I could directly edit the definitions file, but for obvious reasons, I would rather avoid doing so.