From 01f88afb81a6dddeb1b331bf6de6e0c92ffe77ef Mon Sep 17 00:00:00 2001 From: Alexander T Date: Fri, 1 Nov 2019 19:47:28 +0200 Subject: [PATCH] jsonata: Provides its own types (#39583) --- notNeededPackages.json | 6 ++++++ types/jsonata/index.d.ts | 14 -------------- types/jsonata/jsonata-tests.ts | 12 ------------ types/jsonata/tsconfig.json | 25 ------------------------- types/jsonata/tslint.json | 1 - 5 files changed, 6 insertions(+), 52 deletions(-) delete mode 100644 types/jsonata/index.d.ts delete mode 100644 types/jsonata/jsonata-tests.ts delete mode 100644 types/jsonata/tsconfig.json delete mode 100644 types/jsonata/tslint.json diff --git a/notNeededPackages.json b/notNeededPackages.json index 6addfe96ec..b409f91181 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -2046,6 +2046,12 @@ "sourceRepoURL": "https://github.com/mperdeck/jsnlog.js", "asOfVersion": "2.17.2" }, + { + "libraryName": "jsonata", + "typingsPackageName": "jsonata", + "sourceRepoURL": "https://github.com/jsonata-js/jsonata", + "asOfVersion": "1.5.0" + }, { "libraryName": "jsonschema", "typingsPackageName": "jsonschema", diff --git a/types/jsonata/index.d.ts b/types/jsonata/index.d.ts deleted file mode 100644 index c0634c6ef1..0000000000 --- a/types/jsonata/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -// Type definitions for jsonata 1.3 -// Project: https://github.com/jsonata-js/jsonata, http://jsonata.org -// Definitions by: Nick -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare function jsonata(str: string): jsonata.Expression; -declare namespace jsonata { - interface Expression { - evaluate(input: any, bindings?: any, callback?: () => any): any; - assign(key: string, func: (...args: any[]) => any): void; - } -} - -export = jsonata; diff --git a/types/jsonata/jsonata-tests.ts b/types/jsonata/jsonata-tests.ts deleted file mode 100644 index 2125547c02..0000000000 --- a/types/jsonata/jsonata-tests.ts +++ /dev/null @@ -1,12 +0,0 @@ -import jsonata = require("jsonata"); - -const data = { - example: [ - { value: 4 }, - { value: 7 }, - { value: 13 } - ] -}; - -const expression = jsonata("$sum(example.value)"); -const result = expression.evaluate(data); // returns 24 diff --git a/types/jsonata/tsconfig.json b/types/jsonata/tsconfig.json deleted file mode 100644 index c047ca52bf..0000000000 --- a/types/jsonata/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es5", - "es6" - ], - "target": "es6", - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "jsonata-tests.ts" - ] -} \ No newline at end of file diff --git a/types/jsonata/tslint.json b/types/jsonata/tslint.json deleted file mode 100644 index 2750cc0197..0000000000 --- a/types/jsonata/tslint.json +++ /dev/null @@ -1 +0,0 @@ -{ "extends": "dtslint/dt.json" } \ No newline at end of file