Can you rewrite this code to be more optimized for expo react native? You can use typescript, async functions and promise

import * as SQLite from 'expo-sqlite';

const db = SQLite.openDatabase('myDatabase.db');

export const init = () => {
  return new Promise((resolve, reject) => {
    db.transaction((txn) => {
      txn.executeSql(
        'CREATE TABLE IF NOT EXISTS people (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(20), age INT)',
        [],
        () => {
          resolve();
        },
        (err) => { // <-- fixed error here
          reject(err);
        },
      );
    });
  });
};

export const insertPerson = (name, age) => {
  return new Promise((resolve, reject) => {
    db.transaction((txn) => {
      txn.executeSql(
        'INSERT INTO people (name, age) VALUES (?, ?)',
        [name, age],
        (_, result) => { // <-- fixed error here
          resolve(result);
        },
        (err) => { // <-- fixed error here
          reject(err);
        },
      );
    });
  });
};

export const fetchAllPeople = () => {
  return new Promise((resolve, reject) => {
    db.transaction((txn) => {
      txn.executeSql(
        'SELECT * FROM people',
        [],
        (_, result) => { // <-- fixed error here
          resolve(result.rows._array); // <-- fixed error here
        },
        (err) => { // <-- fixed error here
          reject(err);
        },
      );
    });
  });
};