fix: peripheral.find

This commit is contained in:
2025-06-04 04:10:49 +09:00
parent 398c20e6dd
commit 0e292afa02
2 changed files with 5 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "computercraft-ts", "name": "computercraft-ts",
"version": "1.0.4", "version": "1.0.5",
"description": "", "description": "",
"license": "ISC", "license": "ISC",
"author": "", "author": "",

5
types/index.d.ts vendored
View File

@@ -1102,7 +1102,10 @@ declare global {
* @param peripheralType The type to search for * @param peripheralType The type to search for
* @returns The names of found peripherals and the wrapped peripherals * @returns The names of found peripherals and the wrapped peripherals
*/ */
function find(peripheralType: string): [string, any][]; function find(
peripheralType: string,
filter?: (name: string, wrapped: any) => boolean,
): [string, any][];
/** /**
* Gets the names of all attached peripherals. * Gets the names of all attached peripherals.