Comparing version 4.2.1 to 4.2.2
@@ -60,3 +60,3 @@ import { type ChildModel } from 'racer'; | ||
*/ | ||
init(_model: ChildModel): void; | ||
init?(_model: ChildModel): void; | ||
/** | ||
@@ -70,3 +70,3 @@ * Method called by Derby once a component is loaded and ready in the DOM. | ||
*/ | ||
create?: (() => void) | (() => Promise<void>); | ||
create?(): void; | ||
destroy(): void; | ||
@@ -73,0 +73,0 @@ /** |
@@ -68,11 +68,2 @@ /* | ||
} | ||
/** | ||
* Method called by Derby after instantiating a component and before rendering the template. | ||
* | ||
* This should initialize any data needed by the component, like with `this.model.start(...)`. | ||
* | ||
* `init()` could be called from the server and the browser, so do not use any DOM-only methods | ||
* here. Put those in `create()` instead. | ||
*/ | ||
Component.prototype.init = function (_model) { }; | ||
Component.prototype.destroy = function () { | ||
@@ -79,0 +70,0 @@ this.emit('destroy'); |
{ | ||
"name": "derby", | ||
"description": "MVC framework making it easy to write realtime, collaborative applications that run in both Node.js and browsers.", | ||
"version": "4.2.1", | ||
"version": "4.2.2", | ||
"homepage": "http://derbyjs.com/", | ||
@@ -6,0 +6,0 @@ "repository": { |
421329
10174