Ordering of keys is guaranteed on a (modern) literal Javascript object:
>> const sophie = {name: 'Sophie', age: 17, color: 'black'}
>> Object.keys(sophie)
['name', 'age', 'color']
Is it also guaranteed for Javascript/Typescript class constructor args?
class Cat {
constructor(
public name: string,
public age: number,
public color: string
) {}
}
>> const sophie = new Cat('Sophie', 17, 'black')
>> Object.keys(sophie)
['name', 'age', 'color'] <- is this order guaranteed?