45 lines
762 B
TypeScript
45 lines
762 B
TypeScript
![]() |
import { reflection } from "first-di";
|
||
|
|
||
|
@reflection
|
||
|
export class IEnv{
|
||
|
rootFolder!: string;
|
||
|
constructor(){
|
||
|
|
||
|
}
|
||
|
toStringEnv(){
|
||
|
return ''
|
||
|
}
|
||
|
static env(){
|
||
|
return ''
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@reflection
|
||
|
export class DevEnv implements IEnv {
|
||
|
rootFolder:string;
|
||
|
constructor(rootFolder:string){
|
||
|
this.rootFolder = rootFolder
|
||
|
}
|
||
|
toStringEnv(): string {
|
||
|
return DevEnv.env()
|
||
|
}
|
||
|
static env(){
|
||
|
return 'DevEnv'
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@reflection
|
||
|
export class UnitTestEnv implements IEnv{
|
||
|
rootFolder:string;
|
||
|
constructor(rootFolder:string){
|
||
|
this.rootFolder = rootFolder
|
||
|
}
|
||
|
toStringEnv(): string {
|
||
|
return UnitTestEnv.env()
|
||
|
}
|
||
|
static env(){
|
||
|
return 'UnitTestEnv'
|
||
|
|
||
|
}
|
||
|
}
|