1.2.0 • Published 8 years ago

jsontyped v1.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

Jsontyped

Load Json file in Typescript Object

How to use

Simple!

1. Create your json file:

myconfig.json

{
    "port": "3000",
    "databaseName": "teste"
}

2. Define your type:

export interface MyConfig {
    port: number;
    databaseName: String;
}

3. Load your json file and use:

import { JsonLoader } from "jsontyped";

var config: MyConfig = JsonLoader.loadFile<MyConfig>("./myconfig.json");

connect(config.port, config.databaseName);
1.2.0

8 years ago

1.1.5

8 years ago

1.1.4

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago