-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smolov denis vladimirovich #17
Smolov denis vladimirovich #17
Conversation
rpgsaga/saga/src/car.ts
Outdated
import { Vehicle } from './vehicle'; | ||
|
||
export class Car extends Vehicle { | ||
public fuel: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
получается я могу выставить топливо в отрицательное значение
@@ -0,0 +1,21 @@ | |||
export abstract class Vehicle { | |||
public year: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
год выпуска могу поставить отрицательным
if (speed > 150 || speed <-70) { | ||
throw new Error("Too high speed"); | ||
} | ||
this.kph = speed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
class task