As a beginner to web development, I am building a simple game using Svelte.js with JavaScript and Kaboom.js. However, I am encountering an error("Expected 0 arguments, but got 1.ts(2554) Error") in the main.js file after adding a game component to my app.svelte file. Despite my efforts to search for answers on Google, I have been unable to find a solution to the error. I am seeking assistance to understand what I did wrong and how to resolve the issue.
Main.js
import './app.css'
import App from './App.svelte'
const app = new App({
target: document.getElementById('app'),
})
export default app
App.svelte
<script>
import Game from './lib/game.svelte'
let scroll;
</script>
<svelte:window bind:scrollY={scroll}/>
<main>
<div id="one" class="box" style:transform={'translate3d:(0,
${scroll*1}px,0)'}></div>
<div id="two" class="box" style:transform={'translate3d:(0,
${scroll*-1}px,0)'}>
<Game />
</div>
</main>
<style>
#one
{
height: 100vh;
width: 100vw;
}
#two
{
height: 100vh;
width: 100vw;
position: relative;
</style>
game.svelte
<script>
import kboom from 'kaboom'
</script>
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"
/>
<title>Vite + Svelte</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
I tried to add game component to my app.svelte file. But after getting error in main.js I tried to find the argument that causes the problem but I couldn't find it. when I searching on internet it says something about typescript but I didn't use typescript in my project.so I'm really confused!