Can’t export constant in Typescript

My answer refers to TypeScript 2+.

// 1.ts
export const AdminUser = { ... }

// index.ts
import * as users from './docs/users/admin';
var adminUser = users.AdminUser;

The only difference between your code and mine is the * operator in the import statement.

Leave a Comment

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