Could someone enlighten me on why this code is not causing an error?
import { Injectable } from '@angular/core';
interface Animal{
name: string;
}
@Injectable()
export class AnimalService {
lion: Animal = null;
constructor() {}
get(){
return this.lion;
}
}