Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dfahlander authored Nov 20, 2021
1 parent 77541ba commit 99fe5d8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Dexie provides a neat database API with a well thought-through API design, robus
</head>
</html>
```
Yes, it's that simple.
Yes, it's that simple.

[Tutorial](https://dexie.org/docs/Tutorial)

Expand Down Expand Up @@ -143,7 +143,7 @@ db.transaction('rw', db.friends, async() => {
#### Hello World (Typescript)
```js
import Dexie from 'dexie';
import Dexie, { Table } from 'dexie';

interface Friend {
id?: number;
Expand All @@ -155,14 +155,13 @@ interface Friend {
// Declare Database
//
class FriendDatabase extends Dexie {
public friends: Dexie.Table<Friend, number>; // id is number in this case
public friends!: Table<Friend, number>; // id is number in this case

public constructor() {
super("FriendDatabase");
this.version(1).stores({
friends: "++id,name,age"
});
this.friends = this.table("friends");
}
}

Expand Down

0 comments on commit 99fe5d8

Please sign in to comment.