aboutsummaryrefslogtreecommitdiff
path: root/atom/packages/vim-mode/node_modules/event-kit/api.json
blob: 7a969591f3f714a4713fa1e930b666b98ad18829 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
{
  "classes": {
    "CompositeDisposable": {
      "name": "CompositeDisposable",
      "filename": "src/composite-disposable.coffee",
      "srcUrl": "https://github.com/atom/event-kit/blob/v0.7.2/src/composite-disposable.coffee#L4",
      "sections": [
        {
          "name": "Construction and Destruction",
          "description": ""
        },
        {
          "name": "Managing Disposables",
          "description": ""
        }
      ],
      "classMethods": [],
      "instanceMethods": [
        {
          "name": "constructor",
          "sectionName": "Construction and Destruction",
          "srcUrl": "https://github.com/atom/event-kit/blob/v0.7.2/src/composite-disposable.coffee#L12",
          "visibility": "Public",
          "summary": "Construct an instance, optionally with one or more ",
          "description": "Construct an instance, optionally with one or more "
        },
        {
          "name": "dispose",
          "sectionName": "Construction and Destruction",
          "srcUrl": "https://github.com/atom/event-kit/blob/v0.7.2/src/composite-disposable.coffee#L19",
          "visibility": "Public",
          "summary": "Dispose all disposables added to this composite disposable.",
          "description": "Dispose all disposables added to this composite disposable.\n\nIf this object has already been disposed, this method has no effect. "
        },
        {
          "name": "add",
          "sectionName": "Managing Disposables",
          "srcUrl": "https://github.com/atom/event-kit/blob/v0.7.2/src/composite-disposable.coffee#L35",
          "visibility": "Public",
          "summary": "Add a disposable to be disposed when the composite is disposed.",
          "description": "Add a disposable to be disposed when the composite is disposed.\n\nIf this object has already been disposed, this method has no effect.",
          "arguments": [
            {
              "name": "disposable",
              "description": "{Disposable} instance or any object with a `.dispose()` method. ",
              "type": "Disposable",
              "isOptional": false
            }
          ]
        },
        {
          "name": "remove",
          "sectionName": "Managing Disposables",
          "srcUrl": "https://github.com/atom/event-kit/blob/v0.7.2/src/composite-disposable.coffee#L43",
          "visibility": "Public",
          "summary": "Remove a previously added disposable.",
          "description": "Remove a previously added disposable.",
          "arguments": [
            {
              "name": "disposable",
              "description": "{Disposable} instance or any object with a `.dispose()` method. ",
              "type": "Disposable",
              "isOptional": false
            }
          ]
        },
        {
          "name": "clear",
          "sectionName": "Managing Disposables",
          "srcUrl": "https://github.com/atom/event-kit/blob/v0.7.2/src/composite-disposable.coffee#L49",
          "visibility": "Public",
          "summary": "Clear all disposables. They will not be disposed by the next call\nto dispose. ",
          "description": "Clear all disposables. They will not be disposed by the next call\nto dispose. "
        }
      ],
      "classProperties": [],
      "instanceProperties": [],
      "visibility": "Essential",
      "summary": "An object that aggregates multiple {Disposable} instances together\ninto a single disposable, so they can all be disposed as a group. ",
      "description": "An object that aggregates multiple {Disposable} instances together\ninto a single disposable, so they can all be disposed as a group. "
    },
    "Disposable": {
      "name": "Disposable",
      "filename": "src/disposable.coffee",
      "srcUrl": "https://github.com/atom/event-kit/blob/v0.7.2/src/disposable.coffee#L6",
      "sections": [
        {
          "name": "Construction and Destruction",
          "description": ""
        }
      ],
      "classMethods": [],
      "instanceMethods": [
        {
          "name": "constructor",
          "sectionName": "Construction and Destruction",
          "srcUrl": "https://github.com/atom/event-kit/blob/v0.7.2/src/disposable.coffee#L17",
          "visibility": "Public",
          "summary": "Construct a Disposable",
          "description": "Construct a Disposable",
          "arguments": [
            {
              "name": "disposalAction",
              "description": "An action to perform when {::dispose} is called for the first time. ",
              "type": null,
              "isOptional": false
            }
          ]
        },
        {
          "name": "dispose",
          "sectionName": "Construction and Destruction",
          "srcUrl": "https://github.com/atom/event-kit/blob/v0.7.2/src/disposable.coffee#L24",
          "visibility": "Public",
          "summary": "Perform the disposal action, indicating that the resource associated\nwith this disposable is no longer needed.",
          "description": "Perform the disposal action, indicating that the resource associated\nwith this disposable is no longer needed.\n\nYou can call this method more than once, but the disposal action will only\nbe performed the first time. "
        }
      ],
      "classProperties": [],
      "instanceProperties": [],
      "visibility": "Essential",
      "summary": "A handle to a resource that can be disposed. For example,\n{Emitter::on} returns disposables representing subscriptions. ",
      "description": "A handle to a resource that can be disposed. For example,\n{Emitter::on} returns disposables representing subscriptions. "
    },
    "Emitter": {
      "name": "Emitter",
      "filename": "src/emitter.coffee",
      "srcUrl": "https://github.com/atom/event-kit/blob/v0.7.2/src/emitter.coffee#L25",
      "sections": [
        {
          "name": "Construction and Destruction",
          "description": ""
        },
        {
          "name": "Event Subscription",
          "description": ""
        },
        {
          "name": "Event Emission",
          "description": ""
        }
      ],
      "classMethods": [],
      "instanceMethods": [
        {
          "name": "constructor",
          "sectionName": "Construction and Destruction",
          "srcUrl": "https://github.com/atom/event-kit/blob/v0.7.2/src/emitter.coffee#L37",
          "visibility": "Public",
          "summary": "Construct an emitter.",
          "description": "Construct an emitter.\n\n```coffee\n@emitter = new Emitter()\n```"
        },
        {
          "name": "dispose",
          "sectionName": "Construction and Destruction",
          "srcUrl": "https://github.com/atom/event-kit/blob/v0.7.2/src/emitter.coffee#L41",
          "visibility": "Public",
          "summary": "Unsubscribe all handlers. ",
          "description": "Unsubscribe all handlers. "
        },
        {
          "name": "on",
          "sectionName": "Event Subscription",
          "srcUrl": "https://github.com/atom/event-kit/blob/v0.7.2/src/emitter.coffee#L58",
          "visibility": "Public",
          "summary": "Register the given handler function to be invoked whenever events by\nthe given name are emitted via {::emit}.",
          "description": "Register the given handler function to be invoked whenever events by\nthe given name are emitted via {::emit}.",
          "arguments": [
            {
              "name": "eventName",
              "description": "{String} naming the event that you want to invoke the handler when emitted.",
              "type": "String",
              "isOptional": false
            },
            {
              "name": "handler",
              "description": "{Function} to invoke when {::emit} is called with the given event name.",
              "type": "Function",
              "isOptional": false
            }
          ],
          "returnValues": [
            {
              "type": "Disposable",
              "description": "Returns a {Disposable} on which `.dispose()` can be called to unsubscribe."
            }
          ]
        },
        {
          "name": "emit",
          "sectionName": "Event Emission",
          "srcUrl": "https://github.com/atom/event-kit/blob/v0.7.2/src/emitter.coffee#L91",
          "visibility": "Public",
          "summary": "Invoke handlers registered via {::on} for the given event name.",
          "description": "Invoke handlers registered via {::on} for the given event name.",
          "arguments": [
            {
              "name": "eventName",
              "description": "The name of the event to emit. Handlers registered with {::on} for the same name will be invoked.",
              "type": null,
              "isOptional": false
            },
            {
              "name": "value",
              "description": "Callbacks will be invoked with this value as an argument. ",
              "type": null,
              "isOptional": false
            }
          ]
        }
      ],
      "classProperties": [],
      "instanceProperties": [],
      "visibility": "Essential",
      "summary": "Utility class to be used when implementing event-based APIs that\nallows for handlers registered via `::on` to be invoked with calls to\n`::emit`. Instances of this class are intended to be used internally by\nclasses that expose an event-based API.",
      "description": "Utility class to be used when implementing event-based APIs that\nallows for handlers registered via `::on` to be invoked with calls to\n`::emit`. Instances of this class are intended to be used internally by\nclasses that expose an event-based API.\n\nFor example:\n\n```coffee\nclass User\n  constructor: ->\n    @emitter = new Emitter\n\n  onDidChangeName: (callback) ->\n    @emitter.on 'did-change-name', callback\n\n  setName: (name) ->\n    if name isnt @name\n      @name = name\n      @emitter.emit 'did-change-name', name\n    @name\n```"
    }
  }
}