Skip to content

Commit

Permalink
feat: jsr web export
Browse files Browse the repository at this point in the history
  • Loading branch information
load1n9 committed Jun 8, 2024
1 parent f73a47f commit c70be27
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 8 additions & 0 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ import { CPU, type CPUBackendLoader } from "./src/backends/cpu/mod.ts";
import { WASM, type WASMBackendLoader } from "./src/backends/wasm/mod.ts";
import type { BackendLoader } from "./src/core/engine.ts";

onerror = () => {
if (typeof Deno == "undefined") {
throw new Error(
"Warning: Deno is not defined. Did you mean to import from ./web.ts instead of ./mod.ts?",
);
}
};

/**
* The AUTO backend is chosen automatically based on the environment.
*/
Expand Down
8 changes: 0 additions & 8 deletions src/core/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@ import { WASM } from "../backends/wasm/mod.ts";
import type { Sequential } from "./mod.ts";
import type { Backend, BackendType, NetworkConfig } from "./types.ts";

onerror = () => {
if (typeof Deno == "undefined") {
throw new Error(
"Warning: Deno is not defined. Did you mean to import from ./web.ts instead of ./mod.ts?",
);
}
};

export interface BackendInstance {
/**
* Initialize the backend.
Expand Down

0 comments on commit c70be27

Please sign in to comment.