You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Typo in Type Definitions and Usage: argorithm should be algorithm
Description:
There is a typo in the @misskey-dev/browser-image-resizer library. The key argorithm should be algorithm. This typo is present in the type definitions and throughout the codebase where this configuration is used.
Package Version: 2024.1.0
Files Affected:
index.d.ts
Other files where config.argorithm is referenced
Problem:
In the BrowserImageResizerConfigBase type, and in other parts of the codebase, the property argorithm is misspelled. It should be algorithm.
Code Snippet:
typeBrowserImageResizerConfigBase={/** * Algorithm used for downscaling * * * `null`: Just resize with `drawImage()`. The best quality and fastest. * * `bilinear`: Better quality, slower. Comes from upstream (ericnogralesbrowser-image-resizer). * * `hermite`: Worse quality, faster. Comes from [viliusle/Hermite-resize](https://github.com/viliusle/Hermite-resize). Will dispatch workers for better performance. * * `hermite_single`: Worse quality, faster. Single-threaded. * * default: null */argorithm: 'bilinear'|'hermite'|'hermite_single'|'null'|null;
...
};
Proposed Fix:
Rename the argorithm property to algorithm in the type definition.
Update all references to config.argorithm to config.algorithm throughout the codebase.
Corrected Code Snippet:
typeBrowserImageResizerConfigBase={/** * Algorithm used for downscaling * * * `null`: Just resize with `drawImage()`. The best quality and fastest. * * `bilinear`: Better quality, slower. Comes from upstream (ericnogralesbrowser-image-resizer). * * `hermite`: Worse quality, faster. Comes from [viliusle/Hermite-resize](https://github.com/viliusle/Hermite-resize). Will dispatch workers for better performance. * * `hermite_single`: Worse quality, faster. Single-threaded. * * default: null */algorithm: 'bilinear'|'hermite'|'hermite_single'|'null'|null;
...
};
Steps to Reproduce:
Install the package using npm install @misskey-dev/browser-image-resizer.
Import and use the BrowserImageResizerConfigBase type in a TypeScript file.
Notice the typo in the property name argorithm.
Search for config.argorithm in the codebase to find other instances of the typo.
Suggested Labels:
bug
typography
good first issue
The text was updated successfully, but these errors were encountered:
Typo in Type Definitions and Usage:
argorithm
should bealgorithm
Description:
There is a typo in the
@misskey-dev/browser-image-resizer
library. The keyargorithm
should bealgorithm
. This typo is present in the type definitions and throughout the codebase where this configuration is used.Package Version:
2024.1.0
Files Affected:
index.d.ts
config.argorithm
is referencedProblem:
In the
BrowserImageResizerConfigBase
type, and in other parts of the codebase, the propertyargorithm
is misspelled. It should bealgorithm
.Code Snippet:
Proposed Fix:
argorithm
property toalgorithm
in the type definition.config.argorithm
toconfig.algorithm
throughout the codebase.Corrected Code Snippet:
Steps to Reproduce:
npm install @misskey-dev/browser-image-resizer
.BrowserImageResizerConfigBase
type in a TypeScript file.argorithm
.config.argorithm
in the codebase to find other instances of the typo.Suggested Labels:
bug
typography
good first issue
The text was updated successfully, but these errors were encountered: