title: TypeScript imported constant is undefined
body: <p>In my Vue.ts (Vue.js with TypeScript) I have defined a constant <code>serverUrl</code> in one file (http declaration) and I'm importing it into the other file with class <code>AuthService</code>. But this constant is <code>UNDEFINED</code> in either property declaration or constructor of <code>AuthService</code>. In the <code>login()</code> function it's OK. What's the problem?
  Here are my files. http:</p>
  
  <pre><code>import axios, { AxiosError, AxiosRequestConfig } from 'axios';
  
  export const serverUrl = 'http://localhost:63523';       // serverUrl Constant
  
  export const http = axios.create({   timeout: 20000,   headers: {
      'Content-Type': 'application/json',
      'Accept': 'application/json'   } });
  </code></pre>
  
  <p>And the AuthService:</p>
  
  <pre><code>import { http, serverUrl } from '@/services/http';
  
  export class AuthService {
  
    private authUrl: string = serverUrl + '/' + 'auth/login';    // serverUrl = UNDEFINED
  
    constructor() {
      this.authUrl = `${serverUrl}/auth/login`;                   // serverUrl = UNDEFINED
    }
  
    public login(login: string, password: string ) {
      const authUrl2: string = serverUrl + '/' + 'auth/login';   // serverUrl = OK!
      return http.post(authUrl2, {login, password});
    }
  }
  
  export const authService = new AuthService();
  </code></pre>