Skip to content

Commit

Permalink
Update Model type definition.
Browse files Browse the repository at this point in the history
  • Loading branch information
omegascorp committed Sep 5, 2017
1 parent f58e7b8 commit f736969
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "owljs",
"version": "0.8.24",
"version": "0.8.25",
"description": "Backbone-like frontend library",
"main": "index.js",
"typings": "typescript/owl.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/owl.Model.js
Expand Up @@ -26,7 +26,7 @@
if (found instanceof Array && found.length > 1) {
return found[1];
}
return null;
return '';
};
/**
* Gets attribute by name
Expand Down
6 changes: 6 additions & 0 deletions typescript/owl.Model.d.ts
Expand Up @@ -15,6 +15,7 @@ export interface IModelOptions {
*/
export class Model extends EventEmitter {
protected url: string;
protected idAttribute: string;

constructor(data: Object, options: IModelOptions);
/**
Expand Down Expand Up @@ -76,4 +77,9 @@ export class Model extends EventEmitter {
* Gets model collection index
*/
getCollectionIndex(): number;

/**
* Parses ID attribute from URL
*/
parseIdAttribute(url: string): string;
}

0 comments on commit f736969

Please sign in to comment.