Move to TypeScript (#3830)

This moves our JS file to use TS instead, which allows us to use a proper linter to check the code.
All related files where moved out from the root in a dedicated folder to avoid polluting the Rust environment.
This commit is contained in:
daxpedda
2024-07-27 18:26:52 +02:00
committed by GitHub
parent 7b0104b54c
commit 7892e86731
13 changed files with 120 additions and 13 deletions

View File

@@ -175,7 +175,7 @@ impl Schedule {
F: 'static + FnMut(),
{
thread_local! {
static URL: ScriptUrl = ScriptUrl::new(include_str!("worker.min.js"));
static URL: ScriptUrl = ScriptUrl::new(include_str!("../script/worker.min.js"));
static WORKER: Worker = URL.with(|url| Worker::new(&url.0)).expect("`new Worker()` is not expected to fail with a local script");
}