This commit is contained in:
Timo Hocker 2020-05-04 20:25:57 +02:00
parent a94c741624
commit dd5608afb7
2 changed files with 7 additions and 7 deletions

View File

@ -1,7 +1,7 @@
export interface Serializable {
serialize(): string;
}
export interface Deserializable {
deserialize(str: string): Serializable;
export abstract class Serializable {
public abstract serialize(): string;
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public static deserialize (str: string): Serializable {
throw new Error ('not implemented');
}
}

View File

@ -1,2 +1,2 @@
export { Assignable } from './Assignable';
export { Serializable, Deserializable } from './Serializable';
export { Serializable } from './Serializable';