Subscribe is deprecated: Use an observer instead of an error callback

subscribe isn’t deprecated, only the variant you’re using is deprecated. In the future, subscribe will only take one argument: either the next handler (a function) or an observer object. So in your case you should use: .subscribe({ next: this.handleUpdateResponse.bind(this), error: this.handleError.bind(this) }); See these GitHub issues: https://github.com/ReactiveX/rxjs/pull/4202 https://github.com/ReactiveX/rxjs/issues/4159

TSLint extension throwing errors in my Angular application running in Visual Studio Code

Like Tuấn Nguyễn described, you need to: Go to the Command Palette by pressing Ctrl + Shift + P, In the input that pops up at the top of the Visual Studio Code, start typing TSLint: Manage workspace library execution” and hit the Enter key. From the menu that replaces the input, pick enable workspace … Read more

tslint / codelyzer / ng lint error: “for (… in …) statements must be filtered with an if statement”

To explain the actual problem that tslint is pointing out, a quote from the JavaScript documentation of the for…in statement: The loop will iterate over all enumerable properties of the object itself and those the object inherits from its constructor’s prototype (properties closer to the object in the prototype chain override prototypes’ properties). So, basically … Read more

How to use `@ts-ignore` for a block?

You can’t. As a workaround you can use a // @ts-nocheck comment at the top of a file to disable type-checking for that file: https://devblogs.microsoft.com/typescript/announcing-typescript-3-7-beta/ So to disable checking for a block (function, class, etc.), you can move it into its own file, then use the comment/flag above. (This isn’t as flexible as block-based disabling … Read more

In Typescript, what is the ! (exclamation mark / bang) operator when dereferencing a member?

That’s the non-null assertion operator. It is a way to tell the compiler “this expression cannot be null or undefined here, so don’t complain about the possibility of it being null or undefined.” Sometimes the type checker is unable to make that determination itself. It is explained here: A new ! post-fix expression operator may … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)