Browse Source

TS updates

pull/4557/head
Artur Arseniev 4 years ago
parent
commit
1ce31aee75
  1. 9
      index.d.ts

9
index.d.ts

@ -546,6 +546,7 @@ declare namespace grapesjs {
placeholder?: string; placeholder?: string;
changeProp?: number; changeProp?: number;
options?: SelectOption[]; options?: SelectOption[];
command?: (editor: Editor) => void;
[key: string]: any; [key: string]: any;
} }
@ -2921,7 +2922,7 @@ declare namespace grapesjs {
* // Set as a target the CSS selector * // Set as a target the CSS selector
* styleManager.select('.btn > span'); * styleManager.select('.btn > span');
*/ */
select(): any; select(toSelect: any): any;
/** /**
* Get the last selected target. * Get the last selected target.
* By default, the Style Manager shows styles of the last selected target. * By default, the Style Manager shows styles of the last selected target.
@ -4263,7 +4264,7 @@ declare namespace grapesjs {
atRuleType?: string; atRuleType?: string;
atRuleParams?: string; atRuleParams?: string;
} }
): any; ): CssRule | undefined;
/** /**
* Get all rules or filtered by a matching selector. * Get all rules or filtered by a matching selector.
* @example * @example
@ -4275,7 +4276,7 @@ declare namespace grapesjs {
* console.log(css.getRules()) * console.log(css.getRules())
* @param [selector = ''] - Selector, eg. `.myclass` * @param [selector = ''] - Selector, eg. `.myclass`
*/ */
getRules(selector?: string): any; getRules(selector?: string): CssRule[];
/** /**
* Remove rule, by CssRule or matching selector (eg. the selector will match also at-rules like `@media`) * Remove rule, by CssRule or matching selector (eg. the selector will match also at-rules like `@media`)
* @example * @example
@ -4375,7 +4376,7 @@ declare namespace grapesjs {
[Component]: component.html [Component]: component.html
* @defaultValue true * @defaultValue true
*/ */
stylable?: boolean; stylable?: boolean | string[];
} }
interface CssRule extends Backbone.Model<CssRuleOptions>, Styleable { interface CssRule extends Backbone.Model<CssRuleOptions>, Styleable {
/** /**

Loading…
Cancel
Save