mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
Add json3 typing. (#25543)
This commit is contained in:
7
types/json3/index.d.ts
vendored
Normal file
7
types/json3/index.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Type definitions for json3 3.3
|
||||
// Project: https://bestiejs.github.io/json3/
|
||||
// Definitions by: NN <https://github.com/NN--->
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare var json3: JSON;
|
||||
export = json3;
|
||||
5
types/json3/json3-tests.ts
Normal file
5
types/json3/json3-tests.ts
Normal file
@@ -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);
|
||||
24
types/json3/tsconfig.json
Normal file
24
types/json3/tsconfig.json
Normal file
@@ -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"
|
||||
]
|
||||
}
|
||||
3
types/json3/tslint.json
Normal file
3
types/json3/tslint.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Reference in New Issue
Block a user