Currently we compile the clientside bundle to ES5 and the serverside bundle to ES2018. It might be a good idea to keep those equal to each other. This way we have a certainty that the code behaves the same everywhere.
An issue I ran across was the creating an instance of a class with properties in it, like this for example:
public class Car {
public wheels: number;
public doors: number;
}
Clientside we can create a new instance of Car and access the wheels and doors properties.
Serverside we can create a new instance of Car, but the instance doesn't contain the properties anymore.
Currently we compile the clientside bundle to ES5 and the serverside bundle to ES2018. It might be a good idea to keep those equal to each other. This way we have a certainty that the code behaves the same everywhere.
An issue I ran across was the creating an instance of a class with properties in it, like this for example:
Clientside we can create a new instance of
Carand access thewheelsanddoorsproperties.Serverside we can create a new instance of
Car, but the instance doesn't contain the properties anymore.