Element implicitly has an ‘any’ type because expression of type ‘string’ can’t be used to index

For anyone who stumbles upon this in the future: If you’re getting the TypeScript error ‘…expression of type string cannot be used to index…’ then simply specify that the ‘expression of type string’ is a key of the type of that object. For example, const someObj:ObjectType = data; const field = ‘username’; // This gives … Read more

Experimental decorators warning in TypeScript compilation

I’ve to add the following in the settings.json file of vscode to remove the warning. “javascript.implicitProjectConfig.experimentalDecorators”: true VSCode -> Preferences -> Settings UPDATE As Clepsyd pointed out, this setting had been deprecated. You need to use now “js/ts.implicitProjectConfig.experimentalDecorators”:true

‘unknown’ vs. ‘any’

You can read more about unknown in the PR or the RC announcement, but the gist of it is: [..] unknown which is the type-safe counterpart of any. Anything is assignable to unknown, but unknown isn’t assignable to anything but itself and any without a type assertion or a control flow based narrowing. Likewise, no … Read more

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