Skip to content

Commit

Permalink
Throw an error in denoFromPlatformCallback.
Browse files Browse the repository at this point in the history
  • Loading branch information
smack0007 committed Jul 25, 2024
1 parent 6263a79 commit b979893
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/play-wav/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const main = (): number => {
wavLengthBox
) == null
) {
console.error("ERROR: Faield to load wav file.");
console.error("ERROR: Failed to load wav file.");
return 1;
}

Expand Down
7 changes: 4 additions & 3 deletions src/deno/_callbacks.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import { DynamicCallbackDefinition } from "../_library.ts";
import { PlatformCallback } from "../_types.ts";
import { SDLError } from "../error.ts";
import { Callback } from "../types.ts";

interface CallbackInternal extends Callback {
denoCallback?: Deno.UnsafeCallback;
}

export function denoFromPlatformCallback<T extends Callback>(
callback: PlatformCallback,
definition: DynamicCallbackDefinition<T>
_callback: PlatformCallback,
_definition: DynamicCallbackDefinition<T>
): T {
return null as unknown as T;
throw new SDLError(`${denoFromPlatformCallback.name} not implemented.`);
}

export function denoToPlatformCallback<T extends Callback>(
Expand Down

0 comments on commit b979893

Please sign in to comment.