1
0
Fork 0
mirror of https://github.com/codedread/bitjs synced 2025-10-06 02:39:55 +02:00

Update file sniffer.js for public class fields

This commit is contained in:
Jeff Schiller 2022-04-27 13:36:22 -07:00
parent 660810b03d
commit d4d854847f

View file

@ -43,11 +43,16 @@ const fileSignatures = {
* numbers above), then the mimeType field will be set.
*/
class Node {
/** @param {number} value */
/** @type {string} */
mimeType;
/** @type {Object<number, Node>} */
children = {};
/** @param {number} value The byte that this Node points at. */
constructor(value) {
/** @type {number} */
this.value = value;
this.children = {};
this.mimeType = undefined;
}
}
@ -98,7 +103,7 @@ export function initialize() {
/**
* Finds the likely MIME type represented by the ArrayBuffer.
* @param {ArrayBuffer} ab
* @return {string} The MIME type of the buffer, or undefined.
* @returns {string} The MIME type of the buffer, or undefined.
*/
export function findMimeType(ab) {
if (!root) {