Skip to content

Commit

Permalink
Removing useless excludes. The font lib files are imported in the pro…
Browse files Browse the repository at this point in the history
…ject and so tsc will try to build them.
  • Loading branch information
ramonjd committed Nov 29, 2024
1 parent 0fc5fec commit 0f716eb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 31 deletions.
44 changes: 13 additions & 31 deletions packages/edit-site/lib/unbrotli.js
Original file line number Diff line number Diff line change
Expand Up @@ -1703,19 +1703,11 @@ function fromByteArray (uint8) {
decoding of the block lengths, literal insertion lengths and copy lengths.
*/

/**
* Represents the range of values belonging to a prefix code.
* [offset, offset + 2^nbits)
*
* @param {number} offset The starting offset of the range.
* @param {number} nbits The number of bits defining the range.
* @constructor
*/
class PrefixCodeRange {
constructor( offset, nbits ) {
this.offset = offset;
this.nbits = nbits;
}
/* Represents the range of values belonging to a prefix code: */
/* [offset, offset + 2^nbits) */
function PrefixCodeRange(offset, nbits) {
this.offset = offset;
this.nbits = nbits;
}

exports.kBlockLengthPrefixCode = [
Expand Down Expand Up @@ -1832,26 +1824,16 @@ var kOmitFirst7 = 18;
var kOmitFirst8 = 19;
var kOmitFirst9 = 20;

/**
* Represents a transformation with a prefix, a transform type, and a suffix.
*
* @param {string} prefix - The prefix string.
* @param {number} transform - The transform type.
* @param {string} suffix - The suffix string.
* @constructor
*/
class Transform {
constructor( prefix, transform, suffix ) {
this.prefix = new Uint8Array( prefix.length );
this.transform = transform;
this.suffix = new Uint8Array(suffix.length);
function Transform(prefix, transform, suffix) {
this.prefix = new Uint8Array(prefix.length);
this.transform = transform;
this.suffix = new Uint8Array(suffix.length);

for ( var i = 0; i < prefix.length; i++ )
this.prefix[i] = prefix.charCodeAt( i );
for (var i = 0; i < prefix.length; i++)
this.prefix[i] = prefix.charCodeAt(i);

for ( var i = 0; i < suffix.length; i++ )
this.suffix[i] = suffix.charCodeAt( i );
}
for (var i = 0; i < suffix.length; i++)
this.suffix[i] = suffix.charCodeAt(i);
}

var kTransforms = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { useContext, useState } from '@wordpress/element';
*/
import { ALLOWED_FILE_EXTENSIONS } from './utils/constants';
import { FontLibraryContext } from './context';
// @ts-ignore
import { Font } from '../../../../lib/lib-font.browser';
import makeFamiliesFromFaces from './utils/make-families-from-faces';
import { loadFontFaceInBrowser } from './utils';
Expand Down

0 comments on commit 0f716eb

Please sign in to comment.