Is there a TypeScript equivalent to C#'s attributes Is there a TypeScript equivalent to C#'s attributes typescript typescript

Is there a TypeScript equivalent to C#'s attributes


I was wondering if TypeScript has some feature like that?

Decorators are like that. E.g. mobx (https://github.com/mobxjs/mobx) uses it to make things observable.

class TodoList {    @observable todos = [];    @computed get unfinishedTodoCount() {        return this.todos.filter(todo => !todo.finished).length;    }}