Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion emulation/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const main = async () => {

const updatedMessage = await storage.get(firstMessageId);
if (updatedMessage) {
console.log('\n' + formatMessage(updatedMessage, authors));
console.log(`\n${formatMessage(updatedMessage, authors)}`);
}

console.log('\n');
Expand Down
2 changes: 1 addition & 1 deletion emulation/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class Record extends Emitter {
#defineProperties() {
for (const key in this.#data) {
if (key === 'id') continue;
if (Object.prototype.hasOwnProperty.call(this, key)) continue;
if (Object.hasOwn(this, key)) continue;
Object.defineProperty(this, key, {
get() {
const value = this.#data?.[key];
Expand Down
3 changes: 1 addition & 2 deletions globalstorage.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ export class SmartContract {

export type SchemaEntity = { readonly [fieldName: string]: unknown };
export type SchemaEntities =
| { readonly [entityName: string]: SchemaEntity }
| Map<string, SchemaEntity>;
{ readonly [entityName: string]: SchemaEntity } | Map<string, SchemaEntity>;

export interface Schema {
entities?: SchemaEntities;
Expand Down
2 changes: 1 addition & 1 deletion lib/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class Record extends Emitter {
#defineProperties() {
for (const key in this.#data) {
if (key === 'id') continue;
if (Object.prototype.hasOwnProperty.call(this, key)) continue;
if (Object.hasOwn(this, key)) continue;
Object.defineProperty(this, key, {
get() {
const value = this.#data?.[key];
Expand Down
Loading
Loading