diff --git a/types/camaro/camaro-tests.ts b/types/camaro/camaro-tests.ts new file mode 100644 index 0000000000..b99b0201c3 --- /dev/null +++ b/types/camaro/camaro-tests.ts @@ -0,0 +1,3 @@ +import transform = require('camaro'); + +const x: object = transform('text', { text: 'root/child'}); diff --git a/types/camaro/index.d.ts b/types/camaro/index.d.ts new file mode 100644 index 0000000000..5d8b8e5bae --- /dev/null +++ b/types/camaro/index.d.ts @@ -0,0 +1,13 @@ +// Type definitions for camaro 2.2 +// Project: https://github.com/tuananh/camaro +// Definitions by: Tuan Anh Tran +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +/** + * Transform the input xml to json using the input template object. + * @param input The input xml string + * @param template The output template + */ +declare function transform(input: string, template: object): object; +export = transform; diff --git a/types/camaro/tsconfig.json b/types/camaro/tsconfig.json new file mode 100644 index 0000000000..5ebe7d3bb9 --- /dev/null +++ b/types/camaro/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "camaro-tests.ts" + ] +} \ No newline at end of file diff --git a/types/camaro/tslint.json b/types/camaro/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/camaro/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }