Skip to content

Commit

Permalink
fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
robturtle committed Dec 12, 2019
1 parent 9b68dbf commit dd7843c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,15 @@ const guest = new Guest(iGuest);
You may subclass `Model<T>` to extend the interface:

```typescript
import { extend } from 'io-interface';
import { Model } from 'io-interface';

interface IUser {
firstName: string;
lastName: string;
}

interface User extends IUser {}
class User {
class User extends Model<IUser> { // IMPORTANT!!! You need Model<T> to get the constructor
get name(): string {
return `${user.firstName} ${user.lastName}`;
},
Expand Down

0 comments on commit dd7843c

Please sign in to comment.