* A wrapper around nothing. This is used for properties that do not exist to * provide an object with methods that does nothing other than returning the * expected values.
| 201 | * expected values. |
| 202 | */ |
| 203 | class ObjectParserPropNone<P> implements IObjectParserProp<P> { |
| 204 | map(): this { |
| 205 | return this; |
| 206 | } |
| 207 | |
| 208 | mapRaw(): this { |
| 209 | return this; |
| 210 | } |
| 211 | |
| 212 | array(): this { |
| 213 | return this; |
| 214 | } |
| 215 | |
| 216 | arrayRaw(): this { |
| 217 | return this; |
| 218 | } |
| 219 | |
| 220 | prop<L extends keyof P>(): IObjectParserProp<P[L]> { |
| 221 | return new ObjectParserPropNone(); |
| 222 | } |
| 223 | } |
| 224 | |
| 225 | /** |
| 226 | * This class makes it safe and easy to traverse an object of unknown "shape". |
nothing calls this directly
no outgoing calls
no test coverage detected