Added missing types. Updated dependencies

This commit is contained in:
Martin Berg Alstad 2023-03-28 23:43:02 +02:00
parent 05da28d73e
commit 28a8258710
3 changed files with 17 additions and 11 deletions

View File

@ -9,19 +9,19 @@
}, },
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"autoprefixer": "^10.4.13", "autoprefixer": "^10.4.14",
"postcss": "^8.4.21", "postcss": "^8.4.21",
"tailwindcss": "^3.2.7", "tailwindcss": "^3.3.0",
"typescript": "^4.9.5", "typescript": "^5.0.2",
"vite": "^4.1.4", "vite": "^4.2.1",
"vite-plugin-solid": "^2.5.0" "vite-plugin-solid": "^2.6.1"
}, },
"dependencies": { "dependencies": {
"@types/diff": "^5.0.2", "@types/diff": "^5.0.3",
"diff": "^5.1.0", "diff": "^5.1.0",
"solid-headless": "^0.13.1", "solid-headless": "^0.13.1",
"solid-heroicons": "^3.1.1", "solid-heroicons": "^3.1.1",
"solid-js": "^1.6.11", "solid-js": "^1.6.16",
"xlsx": "^0.18.5" "xlsx": "^0.18.5"
} }
} }

View File

@ -1,9 +1,15 @@
/* @refresh reload */ /* @refresh reload */
import type { FetchResultsProps, WebWorkerProps } from '../types/interfaces'; import type { FetchResultsProps, WebWorkerProps } from '../types/interfaces';
onmessage = async (e) => { onmessage = async (e: MessageEvent<WebWorkerProps>) => {
console.log("Worker: Message received from main script") console.log("Worker: Message received from main script")
const { expression, simplifyEnabled, hideValue, sortValue, hideIntermediates }: WebWorkerProps = e.data; const {
expression,
simplifyEnabled,
hideValue,
sortValue,
hideIntermediates
} = e.data;
const result: FetchResultsProps = { const result: FetchResultsProps = {
fetchResult: null, fetchResult: null,

View File

@ -120,8 +120,8 @@ hide=${ hideValues().value }&sort=${ sortValues().value }&hideIntermediate=${ hi
worker.postMessage(input); worker.postMessage(input);
worker.onmessage = (e): void => { worker.onmessage = (e: MessageEvent<FetchResultsProps>): void => {
const data: FetchResultsProps = e.data; const data = e.data;
setIsLoaded(true); setIsLoaded(true);
if (data.fetchResult) { if (data.fetchResult) {
setFetchResult(data.fetchResult); setFetchResult(data.fetchResult);