nesquick 0.0.17 → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,7 +35,7 @@ class NesquickComponent {
35
35
  State_1.subscriptions.reset();
36
36
  return res;
37
37
  }
38
- if (this.props?.xmlns != null) {
38
+ if (this.props.xmlns != null) {
39
39
  let namespace = typeof this.props.xmlns === "function" ? this.props.xmlns() : this.props.xmlns;
40
40
  if (namespace != null) {
41
41
  namespace = String(namespace);
@@ -70,6 +70,9 @@ class NesquickComponent {
70
70
  }
71
71
  }
72
72
  this._renderChildren(document, element, this.props.children);
73
+ if (this.props.ref != null) {
74
+ this.props.ref(element);
75
+ }
73
76
  this.props = {};
74
77
  State_1.subscriptions.reset();
75
78
  return element;
@@ -34,6 +34,7 @@ export declare namespace JSX {
34
34
  [k: string]: any;
35
35
  style?: StyleProps;
36
36
  xmlns?: string;
37
+ ref?: (el: T) => void;
37
38
  }
38
39
  export type StyleProps = {
39
40
  [K in keyof CSSStyleDeclaration]?: CSSStyleDeclaration[K] extends Function ? never : CSSStyleDeclaration[K] | (() => CSSStyleDeclaration[K]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nesquick",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "React-like library with focus on drawing performance",
5
5
  "types": "./lib/types",
6
6
  "main": "./lib",