Skip to content

Commit 84f7562

Browse files
authored
Merge pull request #102 from sigmaSd/lint
fix deno lint and deno check errors
2 parents 0bb0829 + fa5510b commit 84f7562

File tree

7 files changed

+15
-10
lines changed

7 files changed

+15
-10
lines changed

deno.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"name": "@webui/deno-webui",
33
"version": "2.5.9",
4-
"exports": "./mod.ts"
4+
"exports": "./mod.ts",
5+
"imports": {
6+
"@std/fs": "jsr:@std/fs@^1.0.19",
7+
"@std/path": "jsr:@std/path@^1.1.2",
8+
"@zip-js/zip-js": "jsr:@zip-js/zip-js@^2.8.7"
9+
}
510
}

examples/custom_file_handler/custom_file_handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// import { WebUI } from "../../mod.ts";
66

77
// To import from online package registry (Production)
8-
import { WebUI } from "jsr:@webui/deno-webui@2.5.9"; // import {WebUI} from "https://deno.land/x/[email protected]/mod.ts";
8+
import { WebUI } from "@webui/deno-webui"; // import {WebUI} from "https://deno.land/x/[email protected]/mod.ts";
99

1010
// Return HTTP header + file raw binary content
1111
const getFile = async (

examples/custom_web_server/custom_web_server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// import { WebUI } from "../../mod.ts";
66

77
// To import from online package registry (Production)
8-
import { WebUI } from "jsr:@webui/deno-webui@2.5.9"; // import {WebUI} from "https://deno.land/x/[email protected]/mod.ts";
8+
import { WebUI } from "@webui/deno-webui"; // import {WebUI} from "https://deno.land/x/[email protected]/mod.ts";
99

1010
function allEvents(e: WebUI.Event) {
1111
/*

examples/hello_world/hello_world.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// import { WebUI } from "../../mod.ts";
66

77
// To import from online package registry (Production)
8-
import { WebUI } from "jsr:@webui/deno-webui@2.5.9"; // import {WebUI} from "https://deno.land/x/[email protected]/mod.ts";
8+
import { WebUI } from "@webui/deno-webui"; // import {WebUI} from "https://deno.land/x/[email protected]/mod.ts";
99

1010
const myHtml = `<!DOCTYPE html>
1111
<html>

examples/send_raw_binary/send_raw_binary.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// import { WebUI } from "../../mod.ts";
66

77
// To import from online package registry (Production)
8-
import { WebUI } from "jsr:@webui/deno-webui@2.5.9"; // import {WebUI} from "https://deno.land/x/[email protected]/mod.ts";
8+
import { WebUI } from "@webui/deno-webui"; // import {WebUI} from "https://deno.land/x/[email protected]/mod.ts";
99

1010
const myHtml = `<!DOCTYPE html>
1111
<html>

src/utils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Deno WebUI
22
// Utilities
3-
import { dirname, join } from "jsr:@std/path@1.0.8";
4-
import { exists } from "jsr:@std/fs@0.229.3/exists";
5-
import { BlobReader, BlobWriter, ZipReader } from "jsr:@zip-js/zip-js@2.7.60";
3+
import { dirname, join } from "@std/path";
4+
import { exists } from "@std/fs";
5+
import { BlobReader, BlobWriter, ZipReader } from "@zip-js/zip-js";
66

77
// The WebUI core version to download (Consider using this if not using nightly)
88
export const WebUICoreVersion = "2.5.0-beta.3";
@@ -263,7 +263,7 @@ export async function ensureWebUiLib(baseLibName: string): Promise<string> {
263263
* @param {string} value
264264
* @returns a char[].
265265
*/
266-
export function toCString(value: string): Uint8Array {
266+
export function toCString(value: string): Uint8Array<ArrayBuffer> {
267267
return new TextEncoder().encode(value + "\0");
268268
}
269269

src/webui.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ export class WebUI {
610610
* @param functionName - The name of the function to send data to.
611611
* @param raw - The raw data to send.
612612
*/
613-
sendRaw(functionName: string, raw: Uint8Array): void {
613+
sendRaw(functionName: string, raw: Uint8Array<ArrayBuffer>): void {
614614
this.#lib.symbols.webui_send_raw(
615615
BigInt(this.#window),
616616
toCString(functionName),

0 commit comments

Comments
 (0)