Skip to content

Commit

Permalink
fix: use proper type for pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
Phault committed May 10, 2024
1 parent 08a2f39 commit 261aead
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions package/src/runtime/imports.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
declare module "extism:host" {
interface user {
from_virtual_path(path: I64): I64;
to_virtual_path(path: I64): I64;
host_log(input: I64): void;
exec_command(input: I64): I64;
get_env_var(name: I64): I64;
set_env_var(name: I64, value: I64): void;
from_virtual_path(path: PTR): PTR;
to_virtual_path(path: PTR): PTR;
host_log(input: PTR): void;
exec_command(input: PTR): PTR;
get_env_var(name: PTR): PTR;
set_env_var(name: PTR, value: PTR): void;
}
}
14 changes: 7 additions & 7 deletions package/test/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ declare module "main" {
export function verify_checksum(): I32;
}

// These imports unfortunately has to be copied, as extism-js only parses this file.
// These imports unfortunately have to be copied, as extism-js only parses this file.
declare module "extism:host" {
interface user {
from_virtual_path(path: I64): I64;
to_virtual_path(path: I64): I64;
host_log(input: I64): void;
exec_command(input: I64): I64;
get_env_var(name: I64): I64;
set_env_var(name: I64, value: I64): void;
from_virtual_path(path: PTR): PTR;
to_virtual_path(path: PTR): PTR;
host_log(input: PTR): void;
exec_command(input: PTR): PTR;
get_env_var(name: PTR): PTR;
set_env_var(name: PTR, value: PTR): void;
}
}

0 comments on commit 261aead

Please sign in to comment.