// @flow

import type { CardDescriptor } from "./CardDescriptor";

export type CardEntity = {
	isCard: true,
	descriptor: CardDescriptor,
	owner: string
};

export type PermanentEntity = CardEntity & {
	isPermanent: true,
	controller: string
};

/**
 * Represents an entity in the game
 */
export type GameEntity =
	PermanentEntity |
	CardEntity;
@@ -86,16 +86,17 @@
 tity = %7B
+%7C
 %0A%09isCard
@@ -143,24 +143,25 @@
 ner: string%0A
+%7C
 %7D;%0A%0Aexport t
@@ -196,16 +196,17 @@
 tity & %7B
+%7C
 %0A%09isPerm
@@ -238,16 +238,17 @@
  string%0A
+%7C
 %7D;%0A%0A/**%0A

Switch GameEntity to use exact typing to fix Flow narrowing