typescript solution
\nclass ParkingSystem {\n    slots;\n    constructor(big: number, medium: number, small: number) {\n        this.slots = [big, medium, small];\n    }\n\n    add
```\nclass ParkingSystem {\n    slots;\n    constructor(big: number, medium: number, small: number) {\n        this.slots = [big, medium, small];\n    }\n\n    addCar(carType: number): boolean {\n        if (this.slots[carType-1] > 0) {\n            this.slots[carType-1]--;\n            return true;\n        }\n        return false;\n    }\n}\n\n```
[]