Skip to content

Commit

Permalink
Added typescript declaration as kindly created by @jsobell
Browse files Browse the repository at this point in the history
  • Loading branch information
grofit committed Jul 20, 2016
1 parent 1536199 commit db0282d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
21 changes: 21 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
export declare class ValidationStrategy {
actionValidProperty: (element: any, property: any) => void;
actionInvalidProperty: (element: any, property: any, error: any) => void;
}
export declare class InlineStrategy extends ValidationStrategy {
_currentCount: number;
_getElementValidatorId: (element: any) => string;
_createErrorElement: (message: any, element: any) => void;
_removeErrorElement: (element: any) => void;
_addElementError: (message: any, element: any) => void;
actionValidProperty: (element: any, property: any) => void;
actionInvalidProperty: (element: any, property: any, error: any) => void;
}

export declare class ClassHelper {
static hasClass: (element: any, className: any) => any;
static addClass: (element: any, className: any) => void;
static removeClass: (element: any, className: any) => void;
}

export declare function configure(aurelia: any): void;
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "treacherous-aurelia",
"version": "0.1.9",
"version": "0.1.10",
"registry": "jspm",
"description": "A plugin to allow aurelia to work with the treacherous validaiton system",
"keywords": [
Expand All @@ -12,6 +12,7 @@
],
"license": "MIT",
"main": "dist/commonjs/treacherous-aurelia.js",
"typings": "index.d.ts",
"repository": {
"type": "git",
"url": "http://github.com/grofit/treacherous-aurelia"
Expand Down

0 comments on commit db0282d

Please sign in to comment.