Skip to content

Commit

Permalink
Update ts declare file, to be valid (#37)
Browse files Browse the repository at this point in the history
* Update ts declare file, to be valid

* Update ts declare file, to represent access model + Resolve typo
  • Loading branch information
SheepFromHeaven authored and eavichay committed Mar 11, 2018
1 parent c4953f3 commit 1999c4a
Showing 1 changed file with 68 additions and 70 deletions.
138 changes: 68 additions & 70 deletions Slim.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ export declare interface SlimInternals {
}

export declare class Slim extends HTMLElement {

static dashToCamel(dash: string):string;
static camelToDash(camel: string):string;
static get rxInject(): RegExp;
static get rxProp(): RegExp;
static get rxMethod(): RegExp;
protected static dashToCamel(dash: string):string;
protected static camelToDash(camel: string):string;
static rxInject(): RegExp;
static rxProp(): RegExp;
static rxMethod(): RegExp;
static lookup(target:object|Element, expression: string, maybeRepeater:Element):any;

static _$ (target: Element): SlimInternals;
Expand All @@ -38,7 +38,7 @@ export declare class Slim extends HTMLElement {

static createUniqueIndex (): string;

static plugin (
public static plugin (
phase: string,
plugin: (target: Slim) => void
): void;
Expand All @@ -52,89 +52,87 @@ export declare class Slim extends HTMLElement {
directiveFn: (source:Slim, child:Element, attribute: Attr, match: any) => void,
isBlocking: boolean
): void;

static executePlugins (phase: string, target: Slim):void;

private static executePlugins (phase: string, target: Slim):void;
static qSelectAll(target: Element, selector: string):Array<Element>;

static unbind (source: Element, target: Element): void;

static root (target:Element): Element | ShadowRoot;

static selectRecursive (target: Element, force: boolean): Array<Element>;

static removeChild (target: Element): void;


static moveChildren (source: Element, target: Element);

static wrapGetterSetter (element: Element, expression: string): string;

static bindOwn (source:Element, expression: string, executor: function): function;

static bind (source:Element, target: Element, expression: string, executor: function): function;

static update (target: Element, ...props: string): void;

private static wrapGetterSetter (element: Element, expression: string): string;
static bindOwn (source:Element, expression: string, executor: Function): Function;
static bind (source:Element, target: Element, expression: string, executor: Function): Function;
static update (target: Element, ...props: string[]): void;
static commit (target: Element, prop: string);

static readonly uniqueIndex: number;

static readonly tagToClassDict: Map<string, HTMLElement>;

static readonly tagToTemplateDict: Map<string, string>;

static readonly plugins: {
create: Array<(target: Slim) => void>,
added: Array<(target: Slim) => void>,
beforeRender: Array<(target: Slim) => void>,
afterRender: Array<(target: Slim) => void>,
removed: Array<(target: Slim) => void>,
}

static debug: function;

static asap(f: function): any;

protected createdCallback () {}

protected connectedCallback() {}

protected disconnectedCallback() {}

protected attributeChangedCallback() {}

protected get _isInContext(): boolean;

};
static debug: Function;
static asap(f: Function): any;
protected createdCallback (): void
protected connectedCallback(): void
protected disconnectedCallback(): void
protected attributeChangedCallback(): void
protected _isInContext(): boolean;
protected _executeBindings(prop?: string): void;

protected _bindChildren(children: Array<Element>|NodeList<Element>): void;

protected _bindChildren(children: Array<Element>| NodeListOf<Element>): void;
protected _resetBindings(): void;

protected _render (customTemplate?: string): void;

protected _initialize (): void;

public commit (...args: string): void;

public update (...args: string): void;

public render (customTempalte: string): void;

protected onRender() {};
protected onBeforeCreated() {};
protected onCreated() {};
protected onAdded() {};
protected onRemoved() {};

public commit (...args: string[]): void;
public update (...args: string[]): void;
public render (customTemplate: string): void;
protected onRender(): void;
protected onBeforeCreated(): void;
protected onCreated(): void;
protected onAdded(): void;
protected onRemoved(): void;
public find (selector: string): Element;

public findAll (selector: string): Array<Element>|NodeList<Element>;

public findAll (selector: string): Array<Element>| NodeListOf<Element>;
protected callAttribute (attr: string, data: any): any;

get useShadow (): boolean;

get template (): string;
};
useShadow (): boolean;
template (): string;
}

0 comments on commit 1999c4a

Please sign in to comment.