我只是尝试使用javascript运行一些命令以了解更多内容,而当我尝试导入类时,它返回Unexpected token {
export class Vehicle{
constructor(){
}
engineTypeSetter(engine){
this.engineType = engine;
}
wheelNumberSetter(number){
this.wheelNumber = number;
}
};
import {Vehicle} from './vehicle';
class Car extends Vehicle{
constructor(id){
super();
this.id = id;
}
idGetter(){
return this.id;
}
}
let car = new Car(123);
console.log(car.idGetter());
我在做什么错了?