mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 09:23:28 +01:00
use interface to get autocompletion and types for client-side API
This commit is contained in:
parent
49f3014037
commit
1776215ada
@ -854,14 +854,14 @@ Comment this out (for now)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _egw: object;
|
private _egw: IegwAppLocal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The egw function returns the instance of the client side api belonging
|
* The egw function returns the instance of the client side api belonging
|
||||||
* to this widget tree. The api instance can be set in the "container"
|
* to this widget tree. The api instance can be set in the "container"
|
||||||
* widget using the setApiInstance function.
|
* widget using the setApiInstance function.
|
||||||
*/
|
*/
|
||||||
egw()
|
egw() : IegwAppLocal
|
||||||
{
|
{
|
||||||
// The _egw property is not set
|
// The _egw property is not set
|
||||||
if (typeof this._egw === 'undefined') {
|
if (typeof this._egw === 'undefined') {
|
||||||
@ -889,9 +889,9 @@ Comment this out (for now)
|
|||||||
* Sets the client side api instance. It can be retrieved by the widget tree
|
* Sets the client side api instance. It can be retrieved by the widget tree
|
||||||
* by using the "egw()" function.
|
* by using the "egw()" function.
|
||||||
*
|
*
|
||||||
* @param {egw} _egw egw object to set
|
* @param {IegwAppLocal} _egw egw object to set
|
||||||
*/
|
*/
|
||||||
setApiInstance(_egw)
|
setApiInstance(_egw : IegwAppLocal)
|
||||||
{
|
{
|
||||||
this._egw = _egw;
|
this._egw = _egw;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user