From dcb2589ccd76e20815be71b80a7a6f3046a4783b Mon Sep 17 00:00:00 2001 From: Xc Date: Sun, 1 May 2022 16:53:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E4=BA=86getRandomValue?= =?UTF-8?q?=EF=BC=8C=E5=90=A6=E5=88=99mocha=E6=90=9E=E4=B8=8D=E8=BF=87?= =?UTF-8?q?=E5=8E=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .mocharc.json | 2 +- lib/store.d.ts | 6 +-- lib/store.js | 3 +- package.json | 14 +++---- src/store.ts | 6 +-- test/build-app-domain.ts | 4 +- test/entities/Address.ts | 12 ++++++ test/entities/Application.ts | 30 +++++++++++++++ test/entities/Area.ts | 11 ++++++ test/entities/ExtraFile.ts | 15 ++++++++ test/entities/Mobile.ts | 10 +++++ test/entities/Role.ts | 8 ++++ test/entities/System.ts | 10 +++++ test/entities/Token.ts | 43 +++++++++++++++++++++ test/entities/User.ts | 70 ++++++++++++++++++++++++++++++++++ test/entities/WechatUser.ts | 19 +++++++++ test/test.ts | 68 +++++++++++++++++++++++++++++---- tsconfig.json | 2 +- tsconfig.mocha.json | 74 ++++++++++++++++++++++++++++++++++++ 19 files changed, 379 insertions(+), 28 deletions(-) create mode 100644 test/entities/Address.ts create mode 100644 test/entities/Application.ts create mode 100644 test/entities/Area.ts create mode 100644 test/entities/ExtraFile.ts create mode 100644 test/entities/Mobile.ts create mode 100644 test/entities/Role.ts create mode 100644 test/entities/System.ts create mode 100644 test/entities/Token.ts create mode 100644 test/entities/User.ts create mode 100644 test/entities/WechatUser.ts create mode 100644 tsconfig.mocha.json diff --git a/.mocharc.json b/.mocharc.json index c6a4697..42b9909 100644 --- a/.mocharc.json +++ b/.mocharc.json @@ -1,5 +1,5 @@ { "extension": ["ts"], - "spec": "test/test*.ts", + "spec": "test/**/*.ts", "require": "ts-node/register" } \ No newline at end of file diff --git a/lib/store.d.ts b/lib/store.d.ts index 0ea2931..0259821 100644 --- a/lib/store.d.ts +++ b/lib/store.d.ts @@ -1,4 +1,4 @@ -import { DeduceCreateSingleOperation, DeduceRemoveOperation, DeduceUpdateOperation, OperationResult, OperateParams, OpRecord, EntityDict, SelectRowShape } from "oak-domain/lib/types/Entity"; +import { DeduceCreateSingleOperation, DeduceRemoveOperation, DeduceUpdateOperation, OperationResult, OperateParams, OpRecord, EntityDict, SelectionResult } from "oak-domain/lib/types/Entity"; import { CascadeStore } from 'oak-domain/lib/store/CascadeStore'; import { StorageSchema } from 'oak-domain/lib/types/Storage'; import { Context } from "oak-domain/lib/types/Context"; @@ -60,9 +60,7 @@ export default class TreeStore> e operate(entity: T, operation: ED[T]['Operation'], context: Cxt, params?: OperateParams): Promise; protected formProjection(entity: T, row: Partial, data: ED[T]['Selection']['data'], result: object, nodeDict: NodeDict, context: Cxt): Promise; private formResult; - select(entity: T, selection: S, context: Cxt, params?: Object): Promise<{ - result: SelectRowShape[]; - }>; + select(entity: T, selection: S, context: Cxt, params?: Object): Promise>; count(entity: T, selection: Omit, context: Cxt, params?: Object): Promise; private addToTxnNode; getStat(): { diff --git a/lib/store.js b/lib/store.js index 9c2a472..ad36543 100644 --- a/lib/store.js +++ b/lib/store.js @@ -12,7 +12,6 @@ const RowStore_1 = require("oak-domain/lib/types/RowStore"); const Demand_2 = require("oak-domain/lib/types/Demand"); const relation_1 = require("oak-domain/lib/store/relation"); const Expression_1 = require("oak-domain/lib/types/Expression"); -const uuid_1 = require("uuid"); ; ; function obscurePass(row, attr, params) { @@ -934,7 +933,7 @@ class TreeStore extends CascadeStore_1.CascadeStore { return this.stat; } async begin() { - const uuid = (0, uuid_1.v4)({ random: await getRandomValues(16) }); + const uuid = `${Math.random()}`; (0, assert_1.default)(!this.activeTxnDict.hasOwnProperty(uuid)); (0, lodash_1.assign)(this.activeTxnDict, { [uuid]: { diff --git a/package.json b/package.json index 4b68996..423ba0b 100644 --- a/package.json +++ b/package.json @@ -5,15 +5,15 @@ "dependencies": { "lodash": "^4.17.21", "luxon": "^2.3.0", - "uuid": "^8.3.2" + "uuid": "^8.3.2", + "oak-domain": "file:../oak-domain" }, "scripts": { - "make-domain": "ts-node test/build-app-domain", - "test": "mocha", - "build": "tsc", - "postinstall": "npm link oak-domain" + "make:domain": "ts-node test/build-app-domain", + "test": "cross-env TS_NODE_PROJECT='tsconfig.mocha.json' mocha", + "build": "tsc" }, - "main": "src/index", + "main": "src/index", "devDependencies": { "@babel/cli": "^7.12.13", "@babel/core": "^7.12.13", @@ -24,7 +24,7 @@ "@types/fs-extra": "^9.0.13", "@types/lodash": "^4.14.168", "@types/mocha": "^8.2.0", - "@types/node": "^14.14.25", + "@types/node": "^14.18.16", "@types/react": "^17.0.2", "@types/uuid": "^8.3.0", "assert": "^2.0.0", diff --git a/src/store.ts b/src/store.ts index 9bc7946..3207f23 100644 --- a/src/store.ts +++ b/src/store.ts @@ -1,6 +1,6 @@ import { assign, cloneDeep, get, keys, last, set, unset } from 'lodash'; import assert from 'assert'; -import { DeduceCreateSingleOperation, DeduceFilter, DeduceSelection, EntityShape, DeduceRemoveOperation, DeduceUpdateOperation, DeduceSorter, DeduceSorterAttr, OperationResult, OperateParams, OpRecord, DeduceCreateOperationData, DeduceUpdateOperationData, UpdateOpResult, RemoveOpResult, SelectOpResult, EntityDict, SelectRowShape } from "oak-domain/lib/types/Entity"; +import { DeduceCreateSingleOperation, DeduceFilter, DeduceSelection, EntityShape, DeduceRemoveOperation, DeduceUpdateOperation, DeduceSorter, DeduceSorterAttr, OperationResult, OperateParams, OpRecord, DeduceCreateOperationData, DeduceUpdateOperationData, UpdateOpResult, RemoveOpResult, SelectOpResult, EntityDict, SelectRowShape, SelectionResult } from "oak-domain/lib/types/Entity"; import { ExpressionKey, EXPRESSION_PREFIX, NodeId, RefAttr } from 'oak-domain/lib/types/Demand'; import { CascadeStore } from 'oak-domain/lib/store/CascadeStore'; import { StorageSchema } from 'oak-domain/lib/types/Storage'; @@ -1079,7 +1079,7 @@ export default class TreeStore> e entity: T, selection: S, context: Cxt, - params?: Object) { + params?: Object) : Promise> { let autoCommit = false; let result; if (!context.getCurrentTxnId()) { @@ -1136,7 +1136,7 @@ export default class TreeStore> e } async begin() { - const uuid = v4({ random: await getRandomValues(16) }) + const uuid = `${Math.random()}`; assert(!this.activeTxnDict.hasOwnProperty(uuid)); assign(this.activeTxnDict, { [uuid]: { diff --git a/test/build-app-domain.ts b/test/build-app-domain.ts index ab53121..fc23595 100644 --- a/test/build-app-domain.ts +++ b/test/build-app-domain.ts @@ -1,6 +1,6 @@ -import { unset } from 'lodash'; import { analyzeEntities, buildSchema } from 'oak-domain/src/compiler/schemalBuilder'; process.env.NODE_ENV = 'development'; -analyzeEntities(`${__dirname}/../../oak-general-business/src/entities`); + +analyzeEntities(`${__dirname}/entities`); buildSchema(`${__dirname}/app-domain/`); \ No newline at end of file diff --git a/test/entities/Address.ts b/test/entities/Address.ts new file mode 100644 index 0000000..ce914bd --- /dev/null +++ b/test/entities/Address.ts @@ -0,0 +1,12 @@ +import { String, Int, Datetime, Image, Boolean, Text } from 'oak-domain/lib/types/DataType'; +import { EntityShape } from 'oak-domain/lib/types/Entity'; +import { Schema as Area } from './Area'; + +export interface Schema extends EntityShape { + detail: String<32>; + area: Area; + phone: String<12>; + name: String<32>; + default: Boolean; + remark: Text; +}; diff --git a/test/entities/Application.ts b/test/entities/Application.ts new file mode 100644 index 0000000..3a57ecb --- /dev/null +++ b/test/entities/Application.ts @@ -0,0 +1,30 @@ +import { String, Int, Datetime, Image, Boolean, Text } from 'oak-domain/lib/types/DataType'; +import { EntityShape } from 'oak-domain/lib/types/Entity'; +import { Schema as System } from './System'; +import { Schema as ExtraFile } from './ExtraFile'; + +export type WechatMpConfig = { + type: 'wechatMp'; + appId: string; + appSecret: string; +}; + +export type WebConfig = { + type: 'web'; + domain: string; +}; + +export type WechatPublicCofig = { + type: 'wechatPublic'; + appId: string; + appSecret: string; +}; + +export interface Schema extends EntityShape { + name: String<32>; + description: Text; + type: 'web' | 'wechatPublic' | 'wechatMp'; + system: System; + dd: Array; + config: WebConfig | WechatMpConfig| WechatPublicCofig; +}; diff --git a/test/entities/Area.ts b/test/entities/Area.ts new file mode 100644 index 0000000..1de4eef --- /dev/null +++ b/test/entities/Area.ts @@ -0,0 +1,11 @@ +import { String, Geo } from 'oak-domain/lib/types/DataType'; +import { EntityShape } from 'oak-domain/lib/types/Entity'; + +export interface Schema extends EntityShape { + name: String<32>; + level: 'province' | 'city' | 'district' | 'street' | 'country'; + depth: 0 | 1 | 2 | 3 | 4; + parent?: Schema; + code: String<12>; + center: Geo; +}; diff --git a/test/entities/ExtraFile.ts b/test/entities/ExtraFile.ts new file mode 100644 index 0000000..bd7f767 --- /dev/null +++ b/test/entities/ExtraFile.ts @@ -0,0 +1,15 @@ +import { String, Int, Text, Image } from 'oak-domain/lib/types/DataType'; +import { EntityShape } from 'oak-domain/lib/types/Entity'; + +export interface Schema extends EntityShape { + origin: 'qiniu'; + type: 'image' | 'pdf' | 'video' | 'audio' | 'file'; + bucket: String<16>; + objectId: String<64>; + tag1: String<16>; + tag2: String<16>; + filename: String<64>; + md5: Text; + entity: String<32>; + entityId: String<64>; +}; diff --git a/test/entities/Mobile.ts b/test/entities/Mobile.ts new file mode 100644 index 0000000..6cf84c4 --- /dev/null +++ b/test/entities/Mobile.ts @@ -0,0 +1,10 @@ +import { String, Int, Text, Image } from 'oak-domain/lib/types/DataType'; +import { Schema as User } from './User'; +import { Schema as Token } from './Token'; +import { EntityShape } from 'oak-domain/lib/types/Entity'; + +export interface Schema extends EntityShape { + mobile: String<16>; + user: User; + tokens: Array; +}; diff --git a/test/entities/Role.ts b/test/entities/Role.ts new file mode 100644 index 0000000..2989c44 --- /dev/null +++ b/test/entities/Role.ts @@ -0,0 +1,8 @@ +import { EntityShape } from 'oak-domain/lib/types/Entity'; +import { String } from 'oak-domain/lib/types/DataType'; + +export interface Schema extends EntityShape { + name: String<64>; +}; + +export type Relation = 'owner'; \ No newline at end of file diff --git a/test/entities/System.ts b/test/entities/System.ts new file mode 100644 index 0000000..0b2bcde --- /dev/null +++ b/test/entities/System.ts @@ -0,0 +1,10 @@ +import { String, Int, Datetime, Image, Boolean, Text } from 'oak-domain/lib/types/DataType'; +import { EntityShape } from 'oak-domain/lib/types/Entity'; + +export interface Schema extends EntityShape { + name: String<32>; + description: Text; + config: Object; +}; + +export type Relation = 'owner'; \ No newline at end of file diff --git a/test/entities/Token.ts b/test/entities/Token.ts new file mode 100644 index 0000000..33f3432 --- /dev/null +++ b/test/entities/Token.ts @@ -0,0 +1,43 @@ +import { String, Int, Datetime, Image, Boolean } from 'oak-domain/lib/types/DataType'; +import { Schema as User } from './User'; +import { Schema as Application } from './Application'; +import { AbleAction, makeAbleActionDef } from 'oak-domain/lib/actions/action'; +import { EntityShape } from 'oak-domain/lib/types/Entity'; +// https://developers.weixin.qq.com/miniprogram/dev/api/base/system/wx.getSystemInfoSync.html +export type WechatMpEnv = { + type: 'wechatMp', + brand: string; // 设备品牌 + model: string; // 设备型号 + pixelRatio: number; // 设备像素比 + screenWidth: number; // 屏幕宽度 + screenHeight: number; // 屏幕高度 + windowWidth: number; // 窗口宽度 + windowHeight: number; // 窗口高度 + statusBarHeight: number; // 状态栏高度 + language: string; // 语言 + version: string; // 微信版本号 + system: string; // 操作系统及版本 + platform: string; // 平台 + fontSizeSetting: number; // 字体大小 + SDKVersion: string; // 基础库版本 +}; + + +export type WebEnv = { + type: 'web', +}; + +export type Environment = WechatMpEnv | WebEnv; + +export interface Schema extends EntityShape { + application: Application; + entity: String<32>; + entityId: String<64>; + user?: User; + player?: User; + env: Environment; +}; + +type Action = AbleAction; + +const AbleActionDef = makeAbleActionDef('enabled'); diff --git a/test/entities/User.ts b/test/entities/User.ts new file mode 100644 index 0000000..107c3c2 --- /dev/null +++ b/test/entities/User.ts @@ -0,0 +1,70 @@ +import { String, Int, Text, Image, Datetime } from 'oak-domain/lib/types/DataType'; +import { ActionDef } from 'oak-domain/lib/types/Action'; +import { Index } from 'oak-domain/lib/types/Storage'; +import { Schema as ExtraFile } from './ExtraFile'; +import { EntityShape } from 'oak-domain/lib/types/Entity'; + +export interface Schema extends EntityShape { + name?: String<16>; + nickname?: String<64>; + password?: Text; + birth?: Datetime; + gender?: 'male' | 'female'; + avatar?: Image; + idCardType?: 'ID-Card' | 'passport' | 'Mainland-passport'; + idNumber?: String<32>; + ref?: Schema; + files: Array; +}; + +type IdAction = 'verify' | 'accept' | 'reject'; +type IdState = 'unverified' | 'verified' | 'verifying'; +const IdActionDef: ActionDef = { + stm: { + verify: ['unverified', 'verifying'], + accept: [['unverified', 'verifying'], 'verified'], + reject: [['verifying', 'verified'], 'unverified'], + }, + is: 'unverified', +}; + +type UserAction = 'activate' | 'disable' | 'enable' | 'mergeTo' | 'mergeFrom'; +type UserState = 'shadow' | 'normal' | 'disabled' | 'merged'; +const UserActionDef: ActionDef = { + stm: { + activate: ['shadow', 'normal'], + disable: [['normal', 'shadow'], 'disabled'], + enable: ['disabled', 'normal'], + mergeTo: [['normal', 'shadow'], 'merged'], + mergeFrom: ['normal', 'normal'], + }, +}; + +type Action = UserAction | IdAction; + +const indexes: Index[] = [ + { + name: 'index_test2', + attributes: [ + { + name: 'birth', + direction: 'ASC', + }, + ], + }, + { + name: 'index_test', + attributes: [ + { + name: 'name', + }, + { + name: 'nickname', + } + ], + config: { + type: 'fulltext', + parser: 'ngram', + } + } +]; diff --git a/test/entities/WechatUser.ts b/test/entities/WechatUser.ts new file mode 100644 index 0000000..671999b --- /dev/null +++ b/test/entities/WechatUser.ts @@ -0,0 +1,19 @@ +import { String, Int, Datetime, Image, Boolean } from 'oak-domain/lib/types/DataType'; +import { Schema as User } from './User'; +import { Schema as Application } from './Application'; +import { Schema as Token } from './Token'; +import { EntityShape } from 'oak-domain/lib/types/Entity'; + +export interface Schema extends EntityShape { + origin: 'mp' | 'public'; + openId?: String<32>; + unionId?: String<32>; + accessToken?: String<32>; + sessionKey?: String<64>; + subscribed?: Boolean; + subscribedAt?: Datetime; + unsubscribedAt?: Datetime; + user?: User; + application: Application; + tokens: Array; +}; diff --git a/test/test.ts b/test/test.ts index 7ddd235..00c6020 100644 --- a/test/test.ts +++ b/test/test.ts @@ -4,7 +4,7 @@ import TreeStore from '../src/store'; import { EntityDict } from './app-domain/EntityDict'; import { storageSchema } from './app-domain/Storage'; import assert from 'assert'; -import { CreateSingleOperation } from './app-domain/System/Schema'; +import { CreateSingleOperation, CreateOperationData } from './app-domain/System/Schema'; import { UniversalContext } from 'oak-domain/lib/store/UniversalContext'; describe('基础测试', function () { @@ -20,6 +20,10 @@ describe('基础测试', function () { name: 'test', description: 'ttttt', type: 'web', + config: { + type: 'web', + domain: 'http://www.tt.com', + }, system: { action: 'create', data: { @@ -34,6 +38,10 @@ describe('基础测试', function () { name: 'test2', description: 'ttttt2', type: 'web', + config: { + type: 'web', + domain: 'http://www.tt.com', + }, system: { action: 'create', data: { @@ -159,6 +167,10 @@ describe('基础测试', function () { name: 'test', description: 'ttttt', type: 'web', + config: { + type: 'web', + domain: 'http://www.tt.com', + }, system: { action: 'create', data: { @@ -173,6 +185,10 @@ describe('基础测试', function () { name: 'test2', description: 'ttttt2', type: 'web', + config: { + type: 'web', + domain: 'http://www.tt.com', + }, system: { action: 'create', data: { @@ -237,6 +253,10 @@ describe('基础测试', function () { name: 'test', description: 'ttttt', type: 'web', + config: { + type: 'web', + domain: 'http://www.tt.com', + }, system: { action: 'create', data: { @@ -251,6 +271,10 @@ describe('基础测试', function () { name: 'test2', description: 'ttttt2', type: 'web', + config: { + type: 'web', + domain: 'http://www.tt.com', + }, system: { action: 'create', data: { @@ -355,6 +379,10 @@ describe('基础测试', function () { name: 'test', description: 'ttttt', type: 'web', + config: { + type: 'web', + domain: 'http://www.tt.com', + }, system: { action: 'create', data: { @@ -369,6 +397,10 @@ describe('基础测试', function () { name: 'test2', description: 'ttttt2', type: 'web', + config: { + type: 'web', + domain: 'http://www.tt.com', + }, system: { action: 'create', data: { @@ -455,7 +487,7 @@ describe('基础测试', function () { name: 'test2', description: 'aaaaa', config: {}, - application$system: { + application$system: [{ action: 'create', data: [ { @@ -463,16 +495,24 @@ describe('基础测试', function () { name: 'test', description: 'ttttt', type: 'web', + config: { + type: 'web', + domain: 'http://www.tt.com', + }, }, { id: 'aaa2', name: 'test2', description: 'ttttt2', - type: 'weChatMp', + type: 'wechatMp', + config: { + type: 'web', + domain: 'http://www.tt.com', + }, } ] - } + }] } }, context); @@ -482,6 +522,7 @@ describe('基础测试', function () { id: 1, name: 1, application$system: { + $entity: 'application', data: { id: 1, name: 1, @@ -505,7 +546,7 @@ describe('基础测试', function () { }, }, context); // console.log(systems); - assert(systems.result.length === 1); + assert(systems.result.length === 1); const [ system ] = systems.result; const { application$system: applications } = system; assert(applications!.length === 2); @@ -528,7 +569,7 @@ describe('基础测试', function () { name: 'test2', description: 'aaaaa', config: {}, - application$system: { + application$system: [{ action: 'create', data: [ { @@ -536,16 +577,24 @@ describe('基础测试', function () { name: 'test', description: 'ttttt', type: 'web', + config: { + type: 'web', + domain: 'http://www.tt.com', + }, }, { id: 'aaa2', name: 'test2', description: 'ttttt2', - type: 'weChatMp', + type: 'wechatMp', + config: { + type: 'web', + domain: 'http://www.tt.com', + }, } ] - } + }] as CreateOperationData['application$system'] } }, context); @@ -555,6 +604,7 @@ describe('基础测试', function () { id: 1, name: 1, application$system: { + $entity: 'application', data: { id: 1, name: 1, @@ -577,6 +627,7 @@ describe('基础测试', function () { id: 1, name: 1, application$system: { + $entity: 'application', data: { id: 1, name: 1, @@ -592,6 +643,7 @@ describe('基础测试', function () { id: 1, name: 1, application$system: { + $entity: 'application', data: { id: 1, name: 1, diff --git a/tsconfig.json b/tsconfig.json index ce67be5..251cf1d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,7 @@ "lib": [ "dom", "dom.iterable", - "esnext" + "esnext", ], // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ diff --git a/tsconfig.mocha.json b/tsconfig.mocha.json new file mode 100644 index 0000000..b8ab538 --- /dev/null +++ b/tsconfig.mocha.json @@ -0,0 +1,74 @@ +{ + "compilerOptions": { + "jsx": "preserve", + /* Basic Options */ + // "incremental": true, /* Enable incremental compilation */ + "target": "esnext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + "lib": [ + "dom", + "dom.iterable", + "esnext", + ], + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + "outDir": "test-lib", /* Redirect output structure to the directory. */ + // "rootDir": "test", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + /* Strict Type-Checking Options */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + /* Module Resolution Options */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + "typeRoots": [ + "./src/typings" + ], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + /* Source Map Options */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + /* Advanced Options */ + "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + }, + "include": [ + "test/**/*" + ], + "exclude": [ + "node_modules", + ] +} \ No newline at end of file