Posts

Showing posts from June, 2024

@tslint: Type trivally inferred from a literal

Dear TypeScript... My thoughts on this directive about no-inferrable-types has made me realize something: it doesn't serve me and I'm going to show why: export class TransactionsListComponent { addOnBlur = true; readonly separatorKeysCodes = [ENTER, COMMA] as const; #transactions: Transactions; @Input() get transactions(): Transactions { return this.#transactions; } set transactions(value: Transactions) { this.#transactions = value; this.refresh(); } @Output() transactionsChange = new EventEmitter<Transactions>(); @Input() showFilters: boolean; @Input() filters: TransactionFilter; @Output() filtersChange = new EventEmitter<TransactionFilter>(); @Input() showPaginate: boolean; @Input() txShow?: TransactionShowHeaders; @Input() editable: boolean; @Input() showHeader: boolean; @Input() showTags: boolean; currentlyEditing: EditPlaceholder; txns: Transactions; accou