I wonder if there's a way of extracting a type of an existing type(that already had an extended type to it)
Example:
type GameInfo = {
id: number,
name: string,
version: string
} & HttpRequestError;
type HttpRequestError = {
timestamp?: string,
status?: number,
status_code?: number,
error?: string,
message?: string,
};
Now GameInfo has the extended type HttpRequestError. I would like to undo that and only get GameInfo type.
Something like:
const GameInfoWithoutHttpType = GameInfo extract HttpRequestError;
Is this possible?
ThanKS!