diff --git a/.eslintrc b/.eslintrc index d596f936f..17cda3f50 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,11 +1,26 @@ { "env": { - "es6": true, "node": true, "mocha": true }, - "extends": "eslint:recommended", + "extends": [ "eslint:recommended", "@rushstack/eslint-config"], + "overrides": [ + { + "files": ["**/test/typescript/*.ts"], + "rules": { + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-floating-promises": "off" + } + }, + { + "files": ["**/index.d.ts"], + "rules": { + "max-len": "warn" + } + } + ], "parserOptions": { "ecmaVersion": 9, "sourceType": "module" @@ -25,7 +40,7 @@ "SwitchCase": 1 } ], - "keyword-spacing":"error", + "keyword-spacing": "error", "linebreak-style": ["error", "unix"], "max-len": [ "error", @@ -67,6 +82,12 @@ ], "space-infix-ops": ["error"], "space-in-parens": ["error", "never"], - "yoda": "error" + "yoda": "error", + "@typescript-eslint/no-explicit-any": "warn", + "@typescript-eslint/explicit-member-accessibility": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/interface-name-prefix": "off", + "@typescript-eslint/no-namespace": "off", + "@typescript-eslint/typedef": "off" } } diff --git a/apis/fabric-contract-api/package.json b/apis/fabric-contract-api/package.json index 1b069a95c..2d4ca9a62 100644 --- a/apis/fabric-contract-api/package.json +++ b/apis/fabric-contract-api/package.json @@ -12,7 +12,7 @@ "buildt": "tsc --project test/typescript", "test": "nyc mocha --recursive 'test/unit/**/*.js'", "build": "npm run lint && npm run test:unit && npm run test:schema", - "lint": "eslint ./lib/", + "lint": "eslint ./lib ./types ./test/typescript/*.ts --ext .js --ext .ts", "test:unit": "npm run test", "test:schema": "ajv compile -s ./schema/contract-schema.json && ajv validate -s ./schema/contract-schema.json -d ./schema/example-full.json" }, diff --git a/apis/fabric-contract-api/test/typescript/smartcontract.ts b/apis/fabric-contract-api/test/typescript/smartcontract.ts index e972212d5..d681ca554 100644 --- a/apis/fabric-contract-api/test/typescript/smartcontract.ts +++ b/apis/fabric-contract-api/test/typescript/smartcontract.ts @@ -5,13 +5,13 @@ */ -import { Contract, Context } from 'fabric-contract-api'; -import { ChaincodeStub, ClientIdentity } from 'fabric-shim-api'; +import {Contract, Context} from 'fabric-contract-api'; +import {ChaincodeStub, ClientIdentity} from 'fabric-shim-api'; -export class ScenarioContext extends Context{ - customFunction(): void { +export class ScenarioContext extends Context { + customFunction(): void { - } + } } export default class TestContractOne extends Contract { @@ -19,58 +19,58 @@ export default class TestContractOne extends Contract { super('org.papernet.commercialpaper'); } - beforeTransaction(ctx: ScenarioContext) { - // test that the context super class properties are available - const stubApi: ChaincodeStub = ctx.stub; - const clientIdentity: ClientIdentity = ctx.clientIdentity; - - // tests that the functions in the subclasses context be called - ctx.customFunction(); - - // This proves that typescript is enforcing the - // return type of Promise - return Promise.resolve(); - } - - afterTransaction(ctx: ScenarioContext,result: any) { - // This proves that typescript is enforcing the - // return type of Promise - return Promise.resolve(); - } - - aroundTransaction(ctx: ScenarioContext, fn: Function, parameters: any) { - // This proves that typescript is enforcing the - // return type of Promise - return super.aroundTransaction(ctx, fn, parameters); - } - - unknownTransaction(ctx: ScenarioContext){ - // This proves that typescript is enforcing the - // return type of Promise - return Promise.resolve(); - } - - createContext(){ - return new ScenarioContext(); - } - - async Transaction(ctx: ScenarioContext) { - // test that the context super class properties are available - const stubApi: ChaincodeStub = ctx.stub; - const clientIdentity: ClientIdentity = ctx.clientIdentity; - - // test that the name returns a string - const ns: string = this.getName(); - } + beforeTransaction(ctx: ScenarioContext) { + // test that the context super class properties are available + const stubApi: ChaincodeStub = ctx.stub; + const clientIdentity: ClientIdentity = ctx.clientIdentity; + + // tests that the functions in the subclasses context be called + ctx.customFunction(); + + // This proves that typescript is enforcing the + // return type of Promise + return Promise.resolve(); + } + + afterTransaction(ctx: ScenarioContext, result: any) { + // This proves that typescript is enforcing the + // return type of Promise + return Promise.resolve(); + } + + aroundTransaction(ctx: ScenarioContext, fn: Function, parameters: any) { + // This proves that typescript is enforcing the + // return type of Promise + return super.aroundTransaction(ctx, fn, parameters); + } + + unknownTransaction(ctx: ScenarioContext) { + // This proves that typescript is enforcing the + // return type of Promise + return Promise.resolve(); + } + + createContext() { + return new ScenarioContext(); + } + + async Transaction(ctx: ScenarioContext) { + // test that the context super class properties are available + const stubApi: ChaincodeStub = ctx.stub; + const clientIdentity: ClientIdentity = ctx.clientIdentity; + + // test that the name returns a string + const ns: string = this.getName(); + } } export class TestContractTwo extends Contract { - constructor() { - super(); - } - - async Transaction(ctx: Context) { - const stubApi: ChaincodeStub = ctx.stub; - const clientIdentity: ClientIdentity = ctx.clientIdentity; - } + constructor() { + super(); + } + + async Transaction(ctx: Context) { + const stubApi: ChaincodeStub = ctx.stub; + const clientIdentity: ClientIdentity = ctx.clientIdentity; + } } diff --git a/apis/fabric-contract-api/test/typescript/tsconfig.json b/apis/fabric-contract-api/test/typescript/tsconfig.json deleted file mode 100644 index 02a31c3aa..000000000 --- a/apis/fabric-contract-api/test/typescript/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -/* - Copyright 2018 IBM All Rights Reserved. - - SPDX-License-Identifier: Apache-2.0 - -*/ -{ - "compilerOptions": { - "module": "commonjs", - "target": "es2017", - "sourceMap": true, - "lib": [ - "esnext" - ] - }, - "exclude": [ - "node_modules" - ] -} diff --git a/apis/fabric-contract-api/tsconfig.json b/apis/fabric-contract-api/tsconfig.json new file mode 100644 index 000000000..59a3ec302 --- /dev/null +++ b/apis/fabric-contract-api/tsconfig.json @@ -0,0 +1,26 @@ +/* + * Copyright 2020 IBM All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ +{ + "compilerOptions": { + "types": ["./types/"], + "alwaysStrict": true, + "module": "commonjs", + "declaration": true, + "sourceMap": true, + "strict": true, + "target": "es2017", + "lib": [ + "esnext", + ] + }, + "include": [ + "lib/**/*", + "test/**/*" + ], + "exclude": [ + "node_modules/**/*" + ] +} diff --git a/apis/fabric-contract-api/types/index.d.ts b/apis/fabric-contract-api/types/index.d.ts index 71c9342a3..8c0c5f662 100644 --- a/apis/fabric-contract-api/types/index.d.ts +++ b/apis/fabric-contract-api/types/index.d.ts @@ -6,8 +6,8 @@ */ declare module 'fabric-contract-api' { - import { Logger } from 'winston'; - import { ChaincodeStub, ClientIdentity } from 'fabric-shim-api'; + import {Logger} from 'winston'; + import {ChaincodeStub, ClientIdentity} from 'fabric-shim-api'; export class Context { stub: ChaincodeStub; @@ -36,8 +36,8 @@ declare module 'fabric-contract-api' { export class JSONSerializer { - toBuffer(result: any,schema:any,loggerPrefix?:string): Buffer; - fromBuffer(data: Buffer,schema:any,loggerPrefix?:string): any; + toBuffer(result: any, schema:any, loggerPrefix?:string): Buffer; + fromBuffer(data: Buffer, schema:any, loggerPrefix?:string): any; } export function Transaction(commit?: boolean): (target: any, propertyKey: string | symbol) => void; diff --git a/apis/fabric-contract-api/types/tsconfig.json b/apis/fabric-contract-api/types/tsconfig.json deleted file mode 100644 index 8eabad9cb..000000000 --- a/apis/fabric-contract-api/types/tsconfig.json +++ /dev/null @@ -1,34 +0,0 @@ -/* - Copyright 2018 IBM All Rights Reserved. - - SPDX-License-Identifier: Apache-2.0 -*/ -{ - "compilerOptions": { - "removeComments": false, - "preserveConstEnums": true, - "sourceMap": true, - "declaration": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "noImplicitThis": true, - "suppressImplicitAnyIndexErrors": true, - "moduleResolution": "node", - "module": "commonjs", - "target": "es6", - "outDir": "dist", - "baseUrl": ".", - "paths": { - "*": [ - "node_modules/*" - ] - } - }, - "files": [ - "index.d.ts" - ], - "formatCodeOptions": { - "indentSize": 2, - "tabSize": 2 - } -} diff --git a/apis/fabric-shim-api/package.json b/apis/fabric-shim-api/package.json index a3040c578..2f9d5002e 100644 --- a/apis/fabric-shim-api/package.json +++ b/apis/fabric-shim-api/package.json @@ -9,6 +9,7 @@ "url": "https://github.com/hyperledger/fabric-chaincode-node" }, "scripts": { + "lint": "eslint ./types/ --ext .ts", "build": "echo No Build needed" }, "keywords": [ @@ -23,6 +24,7 @@ "types": "./types/index.d.ts", "license": "Apache-2.0", "devDependencies": { - "@types/long": "^4.0.1" + "@types/long": "^4.0.1", + "eslint": "^6.6.0" } } diff --git a/apis/fabric-shim-api/tsconfig.json b/apis/fabric-shim-api/tsconfig.json new file mode 100644 index 000000000..1e383873d --- /dev/null +++ b/apis/fabric-shim-api/tsconfig.json @@ -0,0 +1,25 @@ +/* + * Copyright 2020 IBM All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ +{ + "compilerOptions": { + "types": ["./types/"], + "alwaysStrict": true, + "module": "commonjs", + "declaration": true, + "sourceMap": true, + "strict": true, + "target": "es2017", + "lib": [ + "esnext", + ] + }, + "files": [ + "types/index.d.ts" + ], + "exclude": [ + "node_modules/**/*" + ] +} diff --git a/apis/fabric-shim-api/types/index.d.ts b/apis/fabric-shim-api/types/index.d.ts index 497c1dfba..cf9559e70 100644 --- a/apis/fabric-shim-api/types/index.d.ts +++ b/apis/fabric-shim-api/types/index.d.ts @@ -5,7 +5,7 @@ */ declare module 'fabric-shim-api' { - import Long = require("long"); + import Long = require('long'); interface Timestamp { seconds: Long; @@ -23,12 +23,12 @@ declare module 'fabric-shim-api' { message?: string; payload: Uint8Array; } - + interface ErrorResponse { status: RESPONSE_CODE.ERROR; message: string; payload?: Uint8Array; - } + } interface ClientIdentity { assertAttributeValue(attrName: string, attrValue: string): boolean; diff --git a/apis/fabric-shim-api/types/tsconfig.json b/apis/fabric-shim-api/types/tsconfig.json deleted file mode 100644 index ed09ed38d..000000000 --- a/apis/fabric-shim-api/types/tsconfig.json +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright 2018 IBM All Rights Reserved. - - SPDX-License-Identifier: Apache-2.0 -*/ -{ - "compilerOptions": { - "removeComments": false, - "preserveConstEnums": true, - "sourceMap": true, - "declaration": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "noImplicitThis": true, - "suppressImplicitAnyIndexErrors": true, - "moduleResolution": "node", - "module": "commonjs", - "target": "es6", - "outDir": "dist", - "baseUrl": ".", - "paths": { - "*": [ - "node_modules/*" - ] - }, - "lib": [ - "esnext" - ] - }, - "files": [ - "index.d.ts" - ], - "formatCodeOptions": { - "indentSize": 2, - "tabSize": 2 - } -} diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 36ffcb455..30b3038a5 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -7423,11 +7423,14 @@ packages: dev: false file:projects/fabric-shim-api.tgz: - resolution: {integrity: sha512-XTqk3nknIzx9XDjIwPAqxlcbyVyZuoETwf8eWxffKlp5MOfZWy+IknQAHB23AdOuUtpAg94QVefEIkO1B2NREg==, tarball: file:projects/fabric-shim-api.tgz} + resolution: {integrity: sha512-HVtCRnEfr3iMv9+akMNMC144OI++srlpwPTyvSKr9KrQNjmIwKtEmdNOqrG5532krmUPdn+V6iFnd22PP3bc1Q==, tarball: file:projects/fabric-shim-api.tgz} name: '@rush-temp/fabric-shim-api' version: 0.0.0 dependencies: '@types/long': 4.0.2 + eslint: 6.8.0 + transitivePeerDependencies: + - supports-color dev: false file:projects/fabric-shim-docs.tgz: diff --git a/libraries/fabric-ledger/tsconfig.json b/libraries/fabric-ledger/tsconfig.json index 19d76142c..c45fb9418 100644 --- a/libraries/fabric-ledger/tsconfig.json +++ b/libraries/fabric-ledger/tsconfig.json @@ -4,24 +4,24 @@ * SPDX-License-Identifier: Apache-2.0 */ { - "compilerOptions": { - "alwaysStrict": true, - "module": "commonjs", - "declaration": true, - "outDir": "lib", - "rootDir": "src", - "sourceMap": true, - "strict": true, - "target": "es2017", - "lib": [ - "esnext", - "esnext.asynciterable" - ] - }, - "include": [ - "src/**/*" - ], - "exclude": [ - "node_modules/**/*" + "compilerOptions": { + "alwaysStrict": true, + "module": "commonjs", + "declaration": true, + "outDir": "lib", + "rootDir": "src", + "sourceMap": true, + "strict": true, + "target": "es2017", + "lib": [ + "esnext", + "esnext.asynciterable" + ] + }, + "include": [ + "src/**/*" + ], + "exclude": [ + "node_modules/**/*" ] } diff --git a/libraries/fabric-shim/lib/iterators.js b/libraries/fabric-shim/lib/iterators.js index 9016c8abb..9ca8e9cfd 100644 --- a/libraries/fabric-shim/lib/iterators.js +++ b/libraries/fabric-shim/lib/iterators.js @@ -8,7 +8,7 @@ const logger = require('./logger').getLogger('lib/iterators.js'); -const { ledger } = require('@hyperledger/fabric-protos'); +const {ledger} = require('@hyperledger/fabric-protos'); /** * CommonIterator allows a chaincode to check whether any more result(s) @@ -111,7 +111,7 @@ class CommonIterator { throw err; } } - return { done: true }; + return {done: true}; } } diff --git a/libraries/fabric-shim/package.json b/libraries/fabric-shim/package.json index e16993a38..83698fbb1 100644 --- a/libraries/fabric-shim/package.json +++ b/libraries/fabric-shim/package.json @@ -16,7 +16,7 @@ "update:pbjs": "pbjs -t static-module -p google-protos -p protos $(find google-protos protos -name \"*.proto\" -type f) -o bundle.js", "update:pbts": "pbts -o bundle.d.ts bundle.js", "update": "npm run update:clean && npm run update:copy && npm run update:pbjs && npm run update:pbts", - "lint": "eslint ./lib", + "lint": "eslint ./lib ./types ./test/typescript/*.ts --ext .js --ext .ts", "build": "npm run lint & npm test 2>&1" }, "repository": { diff --git a/libraries/fabric-shim/test/typescript/chaincode.ts b/libraries/fabric-shim/test/typescript/chaincode.ts index 7bcd8bd2c..73ec0410f 100644 --- a/libraries/fabric-shim/test/typescript/chaincode.ts +++ b/libraries/fabric-shim/test/typescript/chaincode.ts @@ -7,7 +7,7 @@ import * as shim from 'fabric-shim'; -import { Shim, +import {Shim, ChaincodeStub, Iterators, ChaincodeInterface, @@ -21,9 +21,9 @@ import { Shim, KeyEndorsementPolicy, ENDORSER_ROLES, Timestamp - } from 'fabric-shim'; +} from 'fabric-shim'; -import { Logger } from 'winston'; +import {Logger} from 'winston'; class TestTS implements ChaincodeInterface { async Init(stub: ChaincodeStub): Promise { @@ -40,12 +40,12 @@ class TestTS implements ChaincodeInterface { if (fcn === 'ThrowError') { const err: Error = new Error('Had a problem'); - return shim.error(Buffer.from(err.message)); + return shim.error(err.message); } if (fcn === 'ThrowErrorShim') { const err: Error = new Error('Had a problem'); - return Shim.error(Buffer.from(err.message)); + return Shim.error(err.message); } if (fcn === 'SuccessShim') { @@ -159,10 +159,10 @@ class TestTS implements ChaincodeInterface { await historyQuery.close(); const done: boolean = historyNext.done; const keyMod: Iterators.KeyModification = historyNext.value; - let isDelete: boolean = keyMod.isDelete; - let timestamp: Timestamp = keyMod.timestamp; - let txid: string = keyMod.txId; - let value: Uint8Array = keyMod.value; + const isDelete: boolean = keyMod.isDelete; + const timestamp: Timestamp = keyMod.timestamp; + const txid: string = keyMod.txId; + const value: Uint8Array = keyMod.value; } async testStateQueryIterator(stateQuery: Iterators.StateQueryIterator) { @@ -170,8 +170,8 @@ class TestTS implements ChaincodeInterface { await stateQuery.close(); const done: boolean = stateNext.done; const keyVal: Iterators.KV = stateNext.value; - let key: string = keyVal.key; - let val: Uint8Array = keyVal.value; + const key: string = keyVal.key; + const val: Uint8Array = keyVal.value; } async testPrivateData(stub: ChaincodeStub): Promise { @@ -217,8 +217,8 @@ class TestTS implements ChaincodeInterface { const TxTimestamp: Timestamp = stub.getTxTimestamp(); const creator: SerializedIdentity = stub.getCreator(); - let idbytes: Uint8Array = creator.idBytes; - let mspid: string = creator.mspid; + const idbytes: Uint8Array = creator.idBytes; + const mspid: string = creator.mspid; const invokeChaincode: ChaincodeResponse = await stub.invokeChaincode('ccid', ['bob', 'duck'], 'channelid'); } @@ -239,28 +239,28 @@ class TestTS implements ChaincodeInterface { } testSignedProposal(proposal: ChaincodeProposal.SignedProposal) { - let prop: ChaincodeProposal.Proposal = proposal.proposal; - let sig: Uint8Array = proposal.signature; + const prop: ChaincodeProposal.Proposal = proposal.proposal; + const sig: Uint8Array = proposal.signature; - let hdr: ChaincodeProposal.Header = prop.header; - let payload: ChaincodeProposal.ChaincodeProposalPayload = prop.payload; + const hdr: ChaincodeProposal.Header = prop.header; + const payload: ChaincodeProposal.ChaincodeProposalPayload = prop.payload; - let cHdr: ChaincodeProposal.ChannelHeader = hdr.channelHeader; - let sHdr: ChaincodeProposal.SignatureHeader = hdr.signatureHeader; + const cHdr: ChaincodeProposal.ChannelHeader = hdr.channelHeader; + const sHdr: ChaincodeProposal.SignatureHeader = hdr.signatureHeader; - let chId: string = cHdr.channelId; - let epoch: number = cHdr.epoch; - let timestamp: Timestamp = cHdr.timestamp; - let hash: Uint8Array = cHdr.tlsCertHash; - let txId: string = cHdr.txId; - let type: ChaincodeProposal.HeaderType = cHdr.type; - let version: number = cHdr.version; + const chId: string = cHdr.channelId; + const epoch: number = cHdr.epoch; + const timestamp: Timestamp = cHdr.timestamp; + const hash: Uint8Array = cHdr.tlsCertHash; + const txId: string = cHdr.txId; + const type: ChaincodeProposal.HeaderType = cHdr.type; + const version: number = cHdr.version; - let creator: SerializedIdentity = sHdr.creator; - let nonce: Uint8Array = sHdr.nonce; + const creator: SerializedIdentity = sHdr.creator; + const nonce: Uint8Array = sHdr.nonce; - let input: Uint8Array = payload.input; - let map: Map = payload.transientMap; + const input: Uint8Array = payload.input; + const map: Map = payload.transientMap; } testQueryResponseMetadata(metadata: QueryResponseMetadata) { diff --git a/libraries/fabric-shim/test/typescript/tsconfig.json b/libraries/fabric-shim/test/typescript/tsconfig.json deleted file mode 100644 index 02a31c3aa..000000000 --- a/libraries/fabric-shim/test/typescript/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -/* - Copyright 2018 IBM All Rights Reserved. - - SPDX-License-Identifier: Apache-2.0 - -*/ -{ - "compilerOptions": { - "module": "commonjs", - "target": "es2017", - "sourceMap": true, - "lib": [ - "esnext" - ] - }, - "exclude": [ - "node_modules" - ] -} diff --git a/libraries/fabric-shim/tsconfig.json b/libraries/fabric-shim/tsconfig.json new file mode 100644 index 000000000..59a3ec302 --- /dev/null +++ b/libraries/fabric-shim/tsconfig.json @@ -0,0 +1,26 @@ +/* + * Copyright 2020 IBM All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ +{ + "compilerOptions": { + "types": ["./types/"], + "alwaysStrict": true, + "module": "commonjs", + "declaration": true, + "sourceMap": true, + "strict": true, + "target": "es2017", + "lib": [ + "esnext", + ] + }, + "include": [ + "lib/**/*", + "test/**/*" + ], + "exclude": [ + "node_modules/**/*" + ] +} diff --git a/libraries/fabric-shim/types/index.d.ts b/libraries/fabric-shim/types/index.d.ts index 259e543c5..bafe7dd4e 100644 --- a/libraries/fabric-shim/types/index.d.ts +++ b/libraries/fabric-shim/types/index.d.ts @@ -6,8 +6,8 @@ */ declare module 'fabric-shim' { - import { Logger } from 'winston'; - import { ChannelOptions } from '@grpc/grpc-js' + import {Logger} from 'winston'; + import {ChannelOptions} from '@grpc/grpc-js'; import { ChaincodeInterface, @@ -37,7 +37,7 @@ declare module 'fabric-shim' { SplitCompositekey, StateQueryResponse, Timestamp - } + }; export function error(msg: string): ErrorResponse; export function newLogger(name: string): Logger; @@ -95,6 +95,8 @@ declare module 'fabric-shim' { } export class ChaincodeStub implements IChaincodeStub { + static RESPONSE_CODE: ResponseCode; + getArgs(): string[]; getStringArgs(): string[]; getFunctionAndParameters(): { params: string[], fcn: string }; @@ -140,8 +142,6 @@ declare module 'fabric-shim' { getPrivateDataByRange(collection: string, startKey: string, endKey: string): Promise & AsyncIterable; getPrivateDataByPartialCompositeKey(collection: string, objectType: string, attributes: string[]): Promise & AsyncIterable; getPrivateDataQueryResult(collection: string, query: string): Promise & AsyncIterable; - - static RESPONSE_CODE: ResponseCode; } export class KeyEndorsementPolicy { diff --git a/libraries/fabric-shim/types/tsconfig.json b/libraries/fabric-shim/types/tsconfig.json deleted file mode 100644 index ed09ed38d..000000000 --- a/libraries/fabric-shim/types/tsconfig.json +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright 2018 IBM All Rights Reserved. - - SPDX-License-Identifier: Apache-2.0 -*/ -{ - "compilerOptions": { - "removeComments": false, - "preserveConstEnums": true, - "sourceMap": true, - "declaration": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "noImplicitThis": true, - "suppressImplicitAnyIndexErrors": true, - "moduleResolution": "node", - "module": "commonjs", - "target": "es6", - "outDir": "dist", - "baseUrl": ".", - "paths": { - "*": [ - "node_modules/*" - ] - }, - "lib": [ - "esnext" - ] - }, - "files": [ - "index.d.ts" - ], - "formatCodeOptions": { - "indentSize": 2, - "tabSize": 2 - } -}