prelim refactor commit

This commit is contained in:
Kevin Jahns
2019-03-26 01:14:15 +01:00
parent 293527e62b
commit d9ab593b07
44 changed files with 2263 additions and 1914 deletions

View File

@@ -0,0 +1,38 @@
import { Y } from '../utils/Y.js' // eslint-disable-line
import { ID } from '../utils/ID.js' // eslint-disable-line
import { Transaction } from '../utils/Transaction.js' // eslint-disable-line
// eslint-disable-next-line
export class AbstractStruct {
/**
* @param {ID} id
*/
constructor (id) {
/**
* The uniqe identifier of this struct.
* @type {ID}
* @readonly
*/
this.id = id
}
/**
* @type {number}
*/
get length () {
throw new Error('unimplemented')
}
}
export class AbstractRef {
/**
* @return {Array<ID|null>}
*/
getMissing () {
return []
}
/**
* @param {Transaction} transaction
* @return {AbstractStruct}
*/
toStruct (transaction) { throw new Error('Must be defined') }
}