Skip to content

Commit b2c2a91

Browse files
authored
chore: remove unused property from translation API (#851)
`TranslationApi` was storing a property called `#table` which was never used. This removes it.
1 parent 90e91ef commit b2c2a91

File tree

4 files changed

+3
-13
lines changed

4 files changed

+3
-13
lines changed

src/mapeo-project.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,6 @@ export class MapeoProject extends TypedEmitter {
345345

346346
this.#translationApi = new TranslationApi({
347347
dataType: this.#dataTypes.translation,
348-
table: translationTable,
349348
})
350349

351350
///////// 4. Replicate local peers automatically

src/translation-api.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export default class TranslationApi {
1414
* Set<import('@comapeo/schema/dist/types.js').SchemaName>>} */
1515
#translatedLanguageCodeToSchemaNames = new Map()
1616
#dataType
17-
#table
1817
#indexPromise
1918

2019
/**
@@ -26,11 +25,9 @@ export default class TranslationApi {
2625
* Translation,
2726
* TranslationValue
2827
* >} opts.dataType
29-
* @param {typeof import('./schema/project.js').translationTable} opts.table
3028
*/
31-
constructor({ dataType, table }) {
29+
constructor({ dataType }) {
3230
this.#dataType = dataType
33-
this.#table = table
3431
this.#indexPromise = this.#dataType
3532
.getMany()
3633
.then((docs) => {

tests/data-type.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,10 +358,7 @@ async function testenv(opts = {}) {
358358
},
359359
})
360360

361-
const translationApi = new TranslationApi({
362-
dataType: translationDataType,
363-
table: translationTable,
364-
})
361+
const translationApi = new TranslationApi({ dataType: translationDataType })
365362

366363
const dataType = new DataType({
367364
dataStore,

tests/translation-api.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,5 @@ function setup() {
151151
},
152152
})
153153

154-
return new TranslationApi({
155-
dataType,
156-
table,
157-
})
154+
return new TranslationApi({ dataType })
158155
}

0 commit comments

Comments
 (0)