Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
erp5
Commits
8c53dfaf
Commit
8c53dfaf
authored
Nov 22, 2019
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
monaco_editor: fix some renderjs.d.ts definitions
parent
d247a8cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
bt5/erp5_monaco_editor/SkinTemplateItem/portal_skins/erp5_monaco_editor/monaco-renderjs.d.ts.ts
...m/portal_skins/erp5_monaco_editor/monaco-renderjs.d.ts.ts
+14
-11
No files found.
bt5/erp5_monaco_editor/SkinTemplateItem/portal_skins/erp5_monaco_editor/monaco-renderjs.d.ts.ts
View file @
8c53dfaf
...
...
@@ -4,12 +4,14 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped (not yet)
// TypeScript Version: 2.4
// erp5_monaco_editor_include portal_skins/erp5_monaco_editor/monaco-rsvp.d.ts rsvp
// XXX needs nexedi RSVP patch loaded.
/**
* A gadget state dict.
*/
interface
GadgetState
{
interface
GadgetState
extends
Object
{
[
key
:
string
]:
any
;
}
...
...
@@ -53,6 +55,11 @@ declare class Gadget {
* To mutate the state, use `changeState`.
*/
public
state
:
GadgetState
;
/**
* The element where this gadget is attached in the DOM, if gadget is already in the DOM.
*/
public
element
?:
HTMLElement
;
/**
* Because declared methods will be added to the gadget class, the type declaration is loose.
...
...
@@ -88,15 +95,6 @@ declare class Gadget {
*/
getDeclaredGadget
(
gadgetScope
:
string
):
RSVP
.
Queue
<
Gadget
>
;
/**
* `setState`: Set Initial State
*
* The gadget's state should be set once when initialising the gadget. The state should contain key/value pairs, but the state is just an ordinary JavaScript object with no hard restrictions.
*
* @param initialState the initial state.
*/
setState
(
initialState
:
GadgetState
):
RSVP
.
Queue
<
void
>
;
/**
* `changeState`: Change State
*
...
...
@@ -112,6 +110,11 @@ declare class Gadget {
* RenderJs gadget class.
*/
interface
GadgetKlass
{
/**
* The HTML element where this gadget class is declared.
*/
__template_element
:
HTMLDocument
;
/**
* `setState`: Set Initial State
*
...
...
@@ -228,7 +231,7 @@ interface GadgetKlass {
* @param argument_list The arguments which the method is called.
* @param scope The caller gadget scope.
*/
(
this
:
Gadget
,
argument_list
:
any
[],
scope
:
string
)
=>
any
(
this
:
Gadget
,
argument_list
:
any
[],
scope
:
string
)
=>
RSVP
.
Promise
<
any
>
):
GadgetKlass
;
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment