2018-11-23 17:11:50 +01:00
|
|
|
import {BlockToolData} from '../tools';
|
2021-04-04 14:10:26 +02:00
|
|
|
import {BlockTuneData} from "../block-tunes/block-tune-data";
|
2018-11-23 17:11:50 +01:00
|
|
|
|
2020-06-03 10:17:29 +02:00
|
|
|
/**
|
|
|
|
* Output of one Tool
|
2021-02-27 22:33:06 +01:00
|
|
|
*
|
|
|
|
* @template Type - the string literal describing a tool type
|
|
|
|
* @template Data - the structure describing a data object supported by the tool
|
2020-06-03 10:17:29 +02:00
|
|
|
*/
|
2021-02-27 22:33:06 +01:00
|
|
|
export interface OutputBlockData<Type extends string = string, Data extends object = any> {
|
2020-06-03 10:17:29 +02:00
|
|
|
/**
|
2021-02-27 22:33:06 +01:00
|
|
|
* Tool type
|
2020-06-03 10:17:29 +02:00
|
|
|
*/
|
2021-02-27 22:33:06 +01:00
|
|
|
type: Type;
|
2020-06-03 10:17:29 +02:00
|
|
|
/**
|
|
|
|
* Saved Block data
|
|
|
|
*/
|
2021-02-27 22:33:06 +01:00
|
|
|
data: BlockToolData<Data>;
|
2021-04-04 14:10:26 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Block Tunes data
|
|
|
|
*/
|
|
|
|
tunes?: {[name: string]: BlockTuneData};
|
2020-06-03 10:17:29 +02:00
|
|
|
}
|
|
|
|
|
2018-11-23 17:11:50 +01:00
|
|
|
export interface OutputData {
|
|
|
|
/**
|
|
|
|
* Editor's version
|
|
|
|
*/
|
|
|
|
version?: string;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Timestamp of saving in milliseconds
|
|
|
|
*/
|
|
|
|
time?: number;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Saved Blocks
|
|
|
|
*/
|
2020-06-03 10:17:29 +02:00
|
|
|
blocks: OutputBlockData[];
|
2018-11-23 17:11:50 +01:00
|
|
|
}
|