diff --git a/Slim.d.ts b/Slim.d.ts new file mode 100644 index 0000000..d45eabd --- /dev/null +++ b/Slim.d.ts @@ -0,0 +1,34 @@ +export declare class Slim { + static polyfill(url:string):void; + static tag(tag:string, template:string, clazz:any):void; + static getTag(clazz:Slim):string; + static plugin(phase:string, plugin:Function):void; + static registerCustomAttribute(attr:string, fn:Function):void; + + createdCallback():void; + attachedCallback():void; + detachedCallback():void; + connectedCallback():void; + disconnectedCallback():void; + + onBeforeCreated():void; + onCreated():void; + onAdded():void; + onRemoved():void; + onBeforeRender():void; + onAfterRender():void; + onBeforeUpdate():void + onAfterUpdate():void; + + update():void; + + render(template?:string):void; + + find(selector:string):HTMLElement; + findAll(selector:string):HTMLElement[]; + watch(prop:string, executor:Function):void; + callAttribute(attributeName:string, value:any); + useShadow:boolean; + isInteractive:boolean; + template:string; +} \ No newline at end of file diff --git a/package.json b/package.json index 4c8990e..875e5d1 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "type": "git", "url": "git+https://github.com/eavichay/slim.js.git" }, + "typings": "Slim.d.ts", "author": "Avichay Eyal ", "license": "MIT", "bugs": {