Merge pull request #21670 from overleaf/jpa-mongo-backend-types

[history-v1] add types to mongo BlobStore backend

GitOrigin-RevId: 7d91074eaa781904f7f3b56390aacee1800a7f67
This commit is contained in:
Jakob Ackermann
2024-11-18 17:08:59 +01:00
committed by Copybot
parent 087b612e16
commit 27076c50cc
8 changed files with 56 additions and 12 deletions

View File

@@ -94,7 +94,7 @@ class Blob {
/**
* Utf-8 length of the blob content, if it appears to be valid UTF-8.
* @return {?number}
* @return {number|undefined}
*/
getStringLength() {
return this.stringLength

View File

@@ -10,7 +10,7 @@ const Change = require('./change')
class ChangeNote {
/**
* @param {number} baseVersion the new base version for the change
* @param {?Change} change
* @param {Change} [change]
*/
constructor(baseVersion, change) {
assert.integer(baseVersion, 'bad baseVersion')

View File

@@ -95,7 +95,7 @@ class File {
/**
* @param {number} byteLength
* @param {number?} stringLength
* @param {number} [stringLength]
* @param {Object} [metadata]
* @return {File}
*/

View File

@@ -47,7 +47,7 @@ class FileData {
/** @see File.createHollow
* @param {number} byteLength
* @param {number|null} stringLength
* @param {number} [stringLength]
*/
static createHollow(byteLength, stringLength) {
if (stringLength == null) {

View File

@@ -27,7 +27,7 @@ class V2DocVersions {
}
/**
* @return {?RawV2DocVersions}
* @return {RawV2DocVersions|null}
*/
toRaw() {
if (!this.data) return null