Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consider switch from JSON to structured TypeScript data files #1

Open
psnider opened this issue Dec 10, 2016 · 1 comment
Open

consider switch from JSON to structured TypeScript data files #1

psnider opened this issue Dec 10, 2016 · 1 comment

Comments

@psnider
Copy link
Owner

psnider commented Dec 10, 2016

Configuration files can become complex,
and they would benefit from the typing that TypeScript provides.

Investigate a general method for loading data from modules instead of from JSON.
These modules could then be written in TypeScript,
so structural and type errors would be caught.

@psnider
Copy link
Owner Author

psnider commented Dec 10, 2016

Such an approach might also support variables in values to simplify expressing relationships between like things.

For example, when many URLs share the same base, that can be put in a variable and used in the URL values. For example:

var BASE_URL = "http://localhost:4000/api"
export var CONFIG = {
    serviceA: {
        url: `${BASE_URL}/a`
    },
    serviceB: {
        url: `${BASE_URL}/b`
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant