Skip to content

Commit

Permalink
chore: fix fmt and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
vixalien committed Jun 10, 2024
1 parent 170f47b commit 86342f3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/base_utils/ffipp.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// deno-lint-ignore-file no-explicit-any
type ReplaceNestedObjectType<T> = {
[K in keyof T]: T[K] extends FFIFunc<infer R, infer A>
? (...args: { [a in keyof A]: ArgType<A[a]> }) => R
Expand Down
13 changes: 6 additions & 7 deletions src/types/argument/array.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import g from "../../bindings/mod.js";
import { boxArgument, unboxArgument } from "../argument.js";

/**
* @param {number} typeTag
* @param {number} typeTag
* @returns {number}
*/
export function getTypeSize(typeTag) {
Expand Down Expand Up @@ -40,9 +40,9 @@ export function getTypeSize(typeTag) {
}

/**
* @param {Deno.PointerValue} type
* @param {number | bigint} pointer
* @param {number} length
* @param {Deno.PointerValue} type
* @param {number | bigint} pointer
* @param {number} length
* @returns {import("../../base_utils/ffipp.d.ts").TypedArray}
*/
export function unboxArray(type, pointer, length) {
Expand Down Expand Up @@ -75,9 +75,8 @@ export function unboxArray(type, pointer, length) {
}

/**
*
* @param {Deno.PointerValue} typeInfo
* @param {any[]} values
* @param {Deno.PointerValue} typeInfo
* @param {any[]} values
* @returns {Uint8Array}
*/
export function boxArray(typeInfo, values) {
Expand Down
1 change: 1 addition & 0 deletions tests/unit/base_utils/ffipp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Deno.test("createType", () => {
"result is not a function",
);

// deno-lint-ignore no-explicit-any
const parameters = [1, 2, 3] as any;
const instance = result(parameters);

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/types/argument/array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ Deno.test("unboxArray", () => {

Deno.test("boxArray", () => {
// TODO: requires getting a typeInfo for an array
})
});

0 comments on commit 86342f3

Please sign in to comment.