TS4023: Exported Variable has or is using name from external module but cannot be named

The compiler is failing to figure out the exact shape of detailRoute, because it does not know the shape of Route. Option 1 One way around this is to import Route from its source, thereby providing the information that the compiler needs to determine the shape of detailRoute. import { Route } from “./../node_modules/vue-router/types/router”; export … Read more

What is the meaning of ‘const’ at the end of a member function declaration?

When you add the const keyword to a method the this pointer will essentially become a pointer to const object, and you cannot therefore change any member data. (Unless you use mutable, more on that later). The const keyword is part of the functions signature which means that you can implement two similar methods, one … Read more

Function parameter types and =>

This is so-called pass-by-name. It means you are passing a function that should return Int but is mostly used to implement lazy evaluation of parameters. It is somewhat similar to: def myFunc(param: () => Int) = param Here is an example. Consider an answer function returning some Int value: def answer = { println(“answer”); 40 … Read more

Declarations in C++

Good question, with a complicated answer. To really grasp this, you need to understand the internal structure of C++ declarations quite thoroughly. (Note that in this answer, I will totally omit the existence of attributes to prevent overcomplication). A declaration has two components: a sequence of specifiers, followed by a comma-separated list of init-declarators. Specifiers … Read more

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