Skip to content

Commit f1fc998

Browse files
fix(framework-configuration): correct type information
1 parent bab4c77 commit f1fc998

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

src/framework-configuration.js

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ export class FrameworkConfiguration {
8080
* @method instance
8181
* @param {Class} type The object type of the dependency that the framework will inject.
8282
* @param {Object} instance The existing instance of the dependency that the framework will inject.
83-
* @return {Plugins} Returns the current Aurelia instance.
83+
* @return {FrameworkConfiguration} Returns the current FrameworkConfiguration instance.
8484
*/
85-
instance(type:any, instance:any):Plugins{
85+
instance(type:any, instance:any):FrameworkConfiguration{
8686
this.container.registerInstance(type, instance);
8787
return this;
8888
}
@@ -93,9 +93,9 @@ export class FrameworkConfiguration {
9393
* @method singleton
9494
* @param {Class} type The object type of the dependency that the framework will inject.
9595
* @param {Object} implementation The constructor function of the dependency that the framework will inject.
96-
* @return {Plugins} Returns the current Aurelia instance.
96+
* @return {FrameworkConfiguration} Returns the current FrameworkConfiguration instance.
9797
*/
98-
singleton(type:any, implementation?:Function):Plugins{
98+
singleton(type:any, implementation?:Function):FrameworkConfiguration{
9999
this.container.registerSingleton(type, implementation);
100100
return this;
101101
}
@@ -106,9 +106,9 @@ export class FrameworkConfiguration {
106106
* @method transient
107107
* @param {Class} type The object type of the dependency that the framework will inject.
108108
* @param {Object} implementation The constructor function of the dependency that the framework will inject.
109-
* @return {Plugins} Returns the current Aurelia instance.
109+
* @return {FrameworkConfiguration} Returns the current FrameworkConfiguration instance.
110110
*/
111-
transient(type:any, implementation?:Function):Plugins{
111+
transient(type:any, implementation?:Function):FrameworkConfiguration{
112112
this.container.registerTransient(type, implementation);
113113
return this;
114114
}
@@ -118,9 +118,9 @@ export class FrameworkConfiguration {
118118
*
119119
* @method addPreStartTask
120120
* @param {Function} task The function to run before start.
121-
* @return {Plugins} Returns the current Plugins instance.
121+
* @return {FrameworkConfiguration} Returns the current FrameworkConfiguration instance.
122122
*/
123-
preTask(task:Function):Plugins{
123+
preTask(task:Function):FrameworkConfiguration{
124124
assertProcessed(this);
125125
this.preTasks.push(task);
126126
return this;
@@ -131,9 +131,9 @@ export class FrameworkConfiguration {
131131
*
132132
* @method addPostStartTask
133133
* @param {Function} task The function to run after start.
134-
* @return {Plugins} Returns the current Plugins instance.
134+
* @return {FrameworkConfiguration} Returns the current FrameworkConfiguration instance.
135135
*/
136-
postTask(task:Function):Plugins{
136+
postTask(task:Function):FrameworkConfiguration{
137137
assertProcessed(this);
138138
this.postTasks.push(task);
139139
return this;
@@ -145,9 +145,9 @@ export class FrameworkConfiguration {
145145
* @method feature
146146
* @param {string} plugin The folder for the internal plugin to configure (expects an index.js in that folder).
147147
* @param {config} config The configuration for the specified plugin.
148-
* @return {Plugins} Returns the current Plugins instance.
148+
* @return {FrameworkConfiguration} Returns the current FrameworkConfiguration instance.
149149
*/
150-
feature(plugin:string, config:any):Plugins{
150+
feature(plugin:string, config:any):FrameworkConfiguration{
151151
plugin = plugin.endsWith('.js') || plugin.endsWith('.ts') ? plugin.substring(0, plugin.length - 3) : plugin;
152152
return this.plugin({ moduleId: plugin + '/index', resourcesRelativeTo: plugin, config: config || {} });
153153
}
@@ -157,9 +157,9 @@ export class FrameworkConfiguration {
157157
*
158158
* @method globalResources
159159
* @param {Object|Array} resources The relative module id to the resource. (Relative to the plugin's installer.)
160-
* @return {Plugins} Returns the current Plugins instance.
160+
* @return {FrameworkConfiguration} Returns the current FrameworkConfiguration instance.
161161
*/
162-
globalResources(resources:string|string[]):Plugins{
162+
globalResources(resources:string|string[]):FrameworkConfiguration{
163163
assertProcessed(this);
164164

165165
let toAdd = Array.isArray(resources) ? resources : arguments,
@@ -185,9 +185,9 @@ export class FrameworkConfiguration {
185185
* @method globalName
186186
* @param {String} resourcePath The path to the resource.
187187
* @param {String} newName The new name.
188-
* @return {Plugins} Returns the current Plugins instance.
188+
* @return {FrameworkConfiguration} Returns the current FrameworkConfiguration instance.
189189
*/
190-
globalName(resourcePath:string, newName:string):Plugins{
190+
globalName(resourcePath:string, newName:string):FrameworkConfiguration{
191191
assertProcessed(this);
192192
this.resourcesToLoad[resourcePath] = newName;
193193
return this;
@@ -199,9 +199,9 @@ export class FrameworkConfiguration {
199199
* @method plugin
200200
* @param {string} plugin The ID of the 3rd party plugin to configure.
201201
* @param {config} config The configuration for the specified plugin.
202-
* @return {Plugins} Returns the current Plugins instance.
202+
* @return {FrameworkConfiguration} Returns the current FrameworkConfiguration instance.
203203
*/
204-
plugin(plugin:string, config:any):Plugins{
204+
plugin(plugin:string, config:any):FrameworkConfiguration{
205205
assertProcessed(this);
206206

207207
if(typeof(plugin) === 'string'){
@@ -235,59 +235,59 @@ export class FrameworkConfiguration {
235235
* Plugs in the default binding language from aurelia-templating-binding.
236236
*
237237
* @method defaultBindingLanguage
238-
* @return {Plugins} Returns the current Plugins instance.
238+
* @return {FrameworkConfiguration} Returns the current FrameworkConfiguration instance.
239239
*/
240-
defaultBindingLanguage():Plugins{
240+
defaultBindingLanguage():FrameworkConfiguration{
241241
return this._addNormalizedPlugin('aurelia-templating-binding');
242242
};
243243

244244
/**
245245
* Plugs in the router from aurelia-templating-router.
246246
*
247247
* @method router
248-
* @return {Plugins} Returns the current Plugins instance.
248+
* @return {FrameworkConfiguration} Returns the current FrameworkConfiguration instance.
249249
*/
250-
router():Plugins{
250+
router():FrameworkConfiguration{
251251
return this._addNormalizedPlugin('aurelia-templating-router');
252252
}
253253

254254
/**
255255
* Plugs in the default history implementation from aurelia-history-browser.
256256
*
257257
* @method history
258-
* @return {Plugins} Returns the current Plugins instance.
258+
* @return {FrameworkConfiguration} Returns the current FrameworkConfiguration instance.
259259
*/
260-
history():Plugins{
260+
history():FrameworkConfiguration{
261261
return this._addNormalizedPlugin('aurelia-history-browser');
262262
}
263263

264264
/**
265265
* Plugs in the default templating resources (if, repeat, show, compose, etc.) from aurelia-templating-resources.
266266
*
267267
* @method defaultResources
268-
* @return {Plugins} Returns the current Plugins instance.
268+
* @return {FrameworkConfiguration} Returns the current FrameworkConfiguration instance.
269269
*/
270-
defaultResources():Plugins{
270+
defaultResources():FrameworkConfiguration{
271271
return this._addNormalizedPlugin('aurelia-templating-resources');
272272
}
273273

274274
/**
275275
* Plugs in the event aggregator from aurelia-event-aggregator.
276276
*
277277
* @method eventAggregator
278-
* @return {Plugins} Returns the current Plugins instance.
278+
* @return {FrameworkConfiguration} Returns the current FrameworkConfiguration instance.
279279
*/
280-
eventAggregator():Plugins{
280+
eventAggregator():FrameworkConfiguration{
281281
return this._addNormalizedPlugin('aurelia-event-aggregator');
282282
}
283283

284284
/**
285285
* Sets up the Aurelia configuration. This is equivalent to calling `.defaultBindingLanguage().defaultResources().history().router().eventAggregator();`
286286
*
287287
* @method standardConfiguration
288-
* @return {Plugins} Returns the current Plugins instance.
288+
* @return {FrameworkConfiguration} Returns the current FrameworkConfiguration instance.
289289
*/
290-
standardConfiguration():Plugins{
290+
standardConfiguration():FrameworkConfiguration{
291291
return this.aurelia.use
292292
.defaultBindingLanguage()
293293
.defaultResources()
@@ -300,9 +300,9 @@ export class FrameworkConfiguration {
300300
* Plugs in the ConsoleAppender and sets the log level to debug.
301301
*
302302
* @method developmentLogging
303-
* @return {Plugins} Returns the current Plugins instance.
303+
* @return {FrameworkConfiguration} Returns the current FrameworkConfiguration instance.
304304
*/
305-
developmentLogging():Plugins{
305+
developmentLogging():FrameworkConfiguration{
306306
this.preTask(() => {
307307
return System.normalize('aurelia-logging-console', this.bootstrapperName).then(name => {
308308
return this.aurelia.loader.loadModule(name).then(m => {

0 commit comments

Comments
 (0)