Commit 1f365ec6 authored by Michael Auer's avatar Michael Auer
Browse files

[WIP] change typescript compilerOptions and fix import export issues

parent ad378d98
module.exports = {
// OHSOME_API_URL : 'https://api.ohsome.org/v0.9-ignite-germany'
OHSOME_API_URL : 'https://api.ohsome.org/v0.9'
// OHSOME_API_URL : 'http://129.206.59.207:8080'
// OHSOME_API_URL : 'http://localhost:8080'
}
......@@ -18,10 +18,10 @@ import turfArea from '@turf/area';
import * as querystring from 'querystring';
import axios, {AxiosRequestConfig, AxiosResponse} from 'axios';
const defaultConfig = require('./conf/default.js');
import defaultConfig from './conf/default';
let OHSOME_API_URL = normalizeUrl(defaultConfig.OHSOME_API_URL); //remove trailing slash and other things
export class Ohsome2X {
class Ohsome2X {
private config: Ohsome2XConfig;
private cursor: number;
private fetchSize: number | null;
......@@ -434,3 +434,4 @@ export class Ohsome2X {
}
export = Ohsome2X;
\ No newline at end of file
const defaultConfig = {
OHSOME_API_URL : 'https://api.ohsome.org/v0.9'
};
export default defaultConfig;
{
"compilerOptions": {
/* Basic Options */
"target": "ES2016", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
"target": "ES2017", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
// "lib": [], /* Specify library files to be included in the compilation. */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
"lib": ["es2017", "dom"], /* Specify library files to be included in the compilation. */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
"declaration": true, /* Generates corresponding '.d.ts' file. */
// "sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
"outDir": "./dist", /* Redirect output structure to the directory. */
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "removeComments": true, /* Do not emit comments to output. */
"removeComments": true, /* Do not emit comments to output. */
// "noEmit": true, /* Do not emit outputs. */
"importHelpers": true, /* Import emit helpers from 'tslib'. */
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment