docs(web): JSDoc comments for svelte actions (#12963)

* Web: JSDoc comments for Actions

* Remove comment
This commit is contained in:
Spencer Fasulo
2024-09-26 21:41:22 -04:00
committed by GitHub
parent 42ad3e6bb0
commit c86fa81e47
7 changed files with 37 additions and 0 deletions
+5
View File
@@ -1,6 +1,11 @@
import { decodeBase64 } from '$lib/utils';
import { thumbHashToRGBA } from 'thumbhash';
/**
* Renders a thumbnail onto a canvas from a base64 encoded hash.
* @param canvas
* @param param1 object containing the base64 encoded hash (base64Thumbhash: yourString)
*/
export function thumbhash(canvas: HTMLCanvasElement, { base64ThumbHash }: { base64ThumbHash: string }) {
const ctx = canvas.getContext('2d');
if (ctx) {