Skip to content

Commit 68c6200

Browse files
authored
🤖 Merge PR DefinitelyTyped#74539 Sync frida-gum typings with Frida 17.8.0 by @ChiChou
1 parent 7ced83f commit 68c6200

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

types/frida-gum/frida-gum-tests.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,17 @@ const moduleObserver = Process.attachModuleObserver({
393393
});
394394
moduleObserver.detach();
395395

396+
const db = SqliteDatabase.openInline("AAAA");
397+
const stmt = db.prepare("SELECT * from tab;");
398+
// $ExpectType string[]
399+
stmt.columnNames;
400+
// $ExpectType SqliteColumnType[]
401+
stmt.columnTypes;
402+
// $ExpectType (string | null)[]
403+
stmt.declaredTypes;
404+
// $ExpectType number
405+
stmt.paramsCount;
406+
396407
// $ExpectType Profiler
397408
const profiler = new Profiler();
398409
const sampler = new BusyCycleSampler();

types/frida-gum/index.d.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3118,6 +3118,28 @@ type SqliteOpenFlag =
31183118
* Pre-compiled SQL statement.
31193119
*/
31203120
declare class SqliteStatement {
3121+
/**
3122+
* Names of the columns in the prepared statement.
3123+
*/
3124+
readonly columnNames: string[];
3125+
3126+
/**
3127+
* Types of the columns in the prepared statement.
3128+
*/
3129+
readonly columnTypes: SqliteColumnType[];
3130+
3131+
/**
3132+
* Declared types of the columns as specified in the table schema. Each
3133+
* element is the type string (e.g. `"TEXT"`, `"INTEGER"`) or `null` if
3134+
* the column has no declared type (e.g. expression columns).
3135+
*/
3136+
readonly declaredTypes: Array<string | null>;
3137+
3138+
/**
3139+
* Number of SQL parameters in the prepared statement.
3140+
*/
3141+
readonly paramsCount: number;
3142+
31213143
/**
31223144
* Binds the integer `value` to `index`.
31233145
*
@@ -3172,6 +3194,8 @@ declare class SqliteStatement {
31723194
reset(): void;
31733195
}
31743196

3197+
type SqliteColumnType = "integer" | "float" | "text" | "blob" | "null";
3198+
31753199
/**
31763200
* Intercepts execution through inline hooking.
31773201
*/

0 commit comments

Comments
 (0)