From 1e538b00abf0d21ddd76f431b5798371d1754d19 Mon Sep 17 00:00:00 2001 From: taoqf Date: Fri, 17 Aug 2018 17:24:42 +0800 Subject: [PATCH] update tsconfig --- src/index.ts | 2 +- tsconfig.json | 33 ++++++++++++++------------------- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/src/index.ts b/src/index.ts index 34f6198..bf68ac3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -215,7 +215,7 @@ export class HTMLElement extends Node { const r = parse(content); content = r.childNodes.length ? r.childNodes : [new TextNode(content)]; } - this.childNodes = content; + this.childNodes = content as Node[]; } get outerHTML() { diff --git a/tsconfig.json b/tsconfig.json index ff3dd25..e6129b1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,9 +1,6 @@ { - "exclude": [ - "./dist/" - ], "include": [ - "./src/**/*.ts" + "./src/" ], "compilerOptions": { "module": "commonjs", @@ -15,10 +12,7 @@ "strictNullChecks": false, "noImplicitThis": true, "rootDir": "./src/", - "rootDirs": [ - "./src/", - "./tests/" - ], + "rootDirs": [], "allowJs": false, "allowUnreachableCode": false, "allowUnusedLabels": false, @@ -27,7 +21,8 @@ "charset": "utf8", "declaration": true, "inlineSourceMap": false, - "allowSyntheticDefaultImports": false, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, "diagnostics": false, "emitBOM": false, "forceConsistentCasingInFileNames": false, @@ -35,12 +30,13 @@ "inlineSources": false, "isolatedModules": false, "lib": [ - // "es6", "esnext" ], + "listFiles": false, + "listEmittedFiles": false, "locale": "zh_CN", - "newLine": "CRLF", - "noEmit": true, + "newLine": "lf", + "noEmit": false, "moduleResolution": "node", "noEmitHelpers": false, "noEmitOnError": false, @@ -49,21 +45,20 @@ "maxNodeModuleJsDepth": 0, "noLib": false, "outDir": "./dist", - // "outFile": "./dist/tqf", "noFallthroughCasesInSwitch": false, "noResolve": false, - "noUnusedLocals": false, - "noUnusedParameters": false, + "noUnusedLocals": true, + "noUnusedParameters": true, "paths": {}, "preserveConstEnums": false, "pretty": true, - // "mapRoot": "", "removeComments": false, - "skipDefaultLibCheck": true, // default false - "skipLibCheck": true, // default false + "skipDefaultLibCheck": true, + "skipLibCheck": true, "stripInternal": false, "suppressExcessPropertyErrors": false, - "suppressImplicitAnyIndexErrors": true, // default false + "suppressImplicitAnyIndexErrors": true, + "traceResolution": false, "typeRoots": [], "types": [ "node"