Skip to content

Commit

Permalink
#68 redonly interface InjectionContext
Browse files Browse the repository at this point in the history
  • Loading branch information
jozef-slezak committed May 8, 2021
1 parent 47f77c5 commit 3add31b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import CodegenOptions from "./context";
import { InjectionContext } from "./injection-context";
import { InjectionContext, DefaultInjectionContext } from "./injection-context";

export class AppContext{
_injectionContext: InjectionContext
_options: CodegenOptions

constructor(options:CodegenOptions){
this._injectionContext = new InjectionContext()
this._injectionContext = new DefaultInjectionContext()
this._options = options
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import { CodegenNaming, Naming } from "../interfaces/naming";

export class InjectionContext{

constructor(){
this._naming = new CodegenNaming()
}
export class DefaultInjectionContext implements InjectionContext {

private _naming : Naming
constructor(public naming = new CodegenNaming()) {

public get naming() : Naming {
return this._naming;
}
private set value(naming : Naming) {
this._naming = naming;
}
}

}

export interface InjectionContext{

readonly naming : Naming

}

0 comments on commit 3add31b

Please sign in to comment.