midwayjs / injection

Injection is a powerful inversion of control container that is widely used in the midway framework and brings good user experience.
MIT License
160 stars 20 forks source link

autowire should apply to null property #16

Closed mariodu closed 5 years ago

mariodu commented 5 years ago

eg:

class Test {
  type: string = null;
  getType(): string {
    return this.type;
  }
}

it will throw error like this

Error: type is not valid in current context
czy88840616 commented 5 years ago

fixed in ts mode