diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..1baa7ab --- /dev/null +++ b/index.d.ts @@ -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; \ No newline at end of file diff --git a/package.json b/package.json index dd6feb9..72d22f0 100644 --- a/package.json +++ b/package.json @@ -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": [ @@ -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"