How to fix Parameter 'x' cannot be referenced in another parameter's initializer in TypeScript | DevErrors