-
Notifications
You must be signed in to change notification settings - Fork 34
NamedMultiple
Mauro Gadaleta edited this page Dec 17, 2019
·
2 revisions
In order to avoid export default class {className}
every single time you create a class is possible to create a named export.
Is also possible to use multiple classes in you single JS file.
Imagine your NamedService.js class file like this
export class NamedService { }
Then your configuration YAML file will look like this in order to use namedService class as service.
services:
named:
class: ./../NamedService
Imagine your MultipleExports.js class file like this
export class ClassOne { }
export class ClassTwo { }
Then your configuration YAML file will look like this in order to use ClassOne and ClassTwo as services.
services:
one:
class: ./../MultipleExports
main: ClassOne
two:
class: ./../MultipleExports
main: ClassTwo
Copyright © 2023-2024 Mauro Gadaleta