(path: string | readonly string[], parentModel?: Model)
| 153 | // getModel(path: string | string[], parentModel?: Model): Model; |
| 154 | // TODO 'a.b.c' is deprecated |
| 155 | getModel(path: string | readonly string[], parentModel?: Model): Model<any> { |
| 156 | const hasPath = path != null; |
| 157 | const pathFinal = hasPath ? this.parsePath(path) : null; |
| 158 | const obj = hasPath |
| 159 | ? this._doGet(pathFinal) |
| 160 | : this.option; |
| 161 | |
| 162 | parentModel = parentModel || ( |
| 163 | this.parentModel |
| 164 | && this.parentModel.getModel(this.resolveParentPath(pathFinal) as [string]) |
| 165 | ); |
| 166 | |
| 167 | return new Model(obj, parentModel, this.ecModel); |
| 168 | } |
| 169 | |
| 170 | /** |
| 171 | * If model has option |
no test coverage detected