I've got an interface which extends 2 other interfaces.
The new interface is identical except for one thing: the field '_id' should be a string instead of an ObjectId (for easier server side operations).
Is it possible to overwrite the type of a field in the new interface? When I do it, tslint tells the new interface doesn't extend properly the previous ones.
Also I'd like to avoid union type such as: _id : ObjectId | string
export interface AchievementDb {
_id: ObjectID;
title: string;
description: string;
// more stuff
}
export interface AchievementUserProgress {
_id: ObjectID;
progress: number;
status: UserAchievementStatus;
// more stuff
}
export interface AchievementFull extends AchievementDb, AchievementUserProgress {
_id: string;
}