mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
13 lines
371 B
TypeScript
13 lines
371 B
TypeScript
class Database {
|
|
transaction(
|
|
// If the type annotation here contains the *name of the method*
|
|
// then it changes how the method is compiled. Rename `transaction`
|
|
// below and see how the output changes.
|
|
callback: (transaction: Transaction) => unknown,
|
|
) {
|
|
return this.table.transaction(
|
|
(x) => callback(new DaoTransaction(x)),
|
|
);
|
|
}
|
|
}
|