import { Tank } from './types/tank' ; const tanksLocal = require ( '../_mocks/tanks.json' ) ; export class TankService { private static _tanks : Tank [ ] = [ ] ; public static async clearCache ( ) { try { this . _tanks = [ ] ; } catch ( ex ) { throw ex ; } } description static returns { Tank [ ] } memberof public static getTanks ( ) { if ( this . _tanks && this . _tanks . length ) { return this . _tanks ; } this . _tanks = tanksLocal . map ( ( t ) => { return new Tank ( t ) ; } ) ; return this . _tanks ; } }