How to import a typescript class in javascript?

Viewed 29252

This is how I import app.config.ts class in typescript and use it. How do I import the same AppConfig class in Javascript file (config.js) and access the method getConfig?

service.ts

import { AppConfig } from '../app.config';
constructor(private http: Http, private config: AppConfig) {
    this.dataURL = this.config.getConfig('restApi') + '/api/getdata/'
    console.log(this.dataURL)
}
1 Answers
Related