♻️ Split SsnDiffType interface into separate file

This commit is contained in:
C-3PO 2018-11-16 00:48:36 +01:00
parent 9aff99ae86
commit bddaef0373
Signed by: c3po
GPG key ID: 62993C4BB4D86F24
9 changed files with 23 additions and 23 deletions

View file

@ -20,7 +20,7 @@ interface ISolidInfo {
uniqueid: string;
}
interface ISolid {
export default interface ISolid {
/** Timestamp when this torrent was created, given in seconds since 1970. Can be read with `new Date(... * 1000)`. */
'creation date': number;
/** Internal tracker URL used to announce this torrent. */
@ -36,5 +36,3 @@ interface ISolid {
/** Contains further information about this torrent, including the list of files. */
info: ISolidInfo;
}
export default ISolid;

View file

@ -1,15 +1,6 @@
enum SsnDiffType {
/** We included the original file contents, not just the differences, because file is new or it's in a format that's not suitable for diffing. */
NewFile = 0,
/** File is not included in the .zip archive because it has been deleted. */
Deleted = 1,
/** File has changed and we include the differences, encoded in vcdiff/xdelta3 */
Changed = 2,
/** File is not included in the .zip archive because it hasn't changed */
Unchanged = 3,
}
import SsnDiffType from './SsnDiffType';
interface ISsnFileEntry {
export default interface ISsnFileEntry {
/** CRC-32 checksum of this file. */
crc: number;
/** If we only store the differences, the size of the destination file. */
@ -33,5 +24,3 @@ interface ISsnFileEntry {
/** Offset into the disk to where the local file header starts. */
offset: number;
}
export { ISsnFileEntry, SsnDiffType };

View file

@ -0,0 +1,12 @@
enum SsnDiffType {
/** We included the original file contents, not just the differences, because file is new or it's in a format that's not suitable for diffing. */
NewFile = 0,
/** File is not included in the .zip archive because it has been deleted. */
Deleted = 1,
/** File has changed and we include the differences, encoded in vcdiff/xdelta3 */
Changed = 2,
/** File is not included in the .zip archive because it hasn't changed */
Unchanged = 3,
}
export default SsnDiffType;