diff --git a/types/json3/index.d.ts b/types/json3/index.d.ts new file mode 100644 index 0000000000..768a76cf14 --- /dev/null +++ b/types/json3/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for json3 3.3 +// Project: https://bestiejs.github.io/json3/ +// Definitions by: NN +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare var json3: JSON; +export = json3; diff --git a/types/json3/json3-tests.ts b/types/json3/json3-tests.ts new file mode 100644 index 0000000000..464f266509 --- /dev/null +++ b/types/json3/json3-tests.ts @@ -0,0 +1,5 @@ +import * as JSON3 from "json3"; + +const obj = JSON3.parse('{ "a" : { "b" : [1, 2] } }'); +const str = JSON3.stringify(obj, null, "\t"); +console.log(str); diff --git a/types/json3/tsconfig.json b/types/json3/tsconfig.json new file mode 100644 index 0000000000..4aa2789a30 --- /dev/null +++ b/types/json3/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "json3-tests.ts" + ] +} diff --git a/types/json3/tslint.json b/types/json3/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/json3/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +}