diff --git a/package.json b/package.json index a8eb4c9b60836..755c04def0b07 100644 --- a/package.json +++ b/package.json @@ -344,7 +344,7 @@ "tslint": "^5.11.0", "tslint-config-prettier": "^1.15.0", "tslint-plugin-prettier": "^2.0.0", - "typescript": "^3.0.3", + "typescript": "^3.1.3", "vinyl-fs": "^3.0.2", "xml2js": "^0.4.19", "xmlbuilder": "9.0.4", diff --git a/tsconfig.json b/tsconfig.json index 0ca1bef98f432..be0be350a8225 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,9 @@ { "compilerOptions": { "baseUrl": ".", + "resolveJsonModule": true, "paths": { - "ui/*": [ - "src/ui/public/*" - ] + "ui/*": ["src/ui/public/*"] }, // Support .tsx files and transform JSX into calls to React.createElement "jsx": "react", @@ -43,15 +42,13 @@ // import tslib helpers rather than inlining helpers for iteration or spreading, for instance "importHelpers": true }, - "include": [ - "src/**/*" - ], + "include": ["src/**/*"], "exclude": [ - "src/**/__fixtures__/**/*", + "src/**/__fixtures__/**/*" // In the build we actually exclude **/public/**/* from this config so that // we can run the TSC on both this and the .browser version of this config // file, but if we did it during development IDEs would not be able to find // the tsconfig.json file for public files correctly. // "src/**/public/**/*" ] -} \ No newline at end of file +} diff --git a/x-pack/plugins/apm/types.d.ts b/x-pack/plugins/apm/types.d.ts index e538124ba47eb..ac836cea8722d 100644 --- a/x-pack/plugins/apm/types.d.ts +++ b/x-pack/plugins/apm/types.d.ts @@ -7,10 +7,6 @@ // allow JSON files to be imported directly without TSLint errors // see: https://github.com/palantir/tslint/issues/1264#issuecomment-228433367 // and: https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#arbitrary-expressions-are-forbidden-in-export-assignments-in-ambient-contexts -declare module '*.json' { - const json: any; - export default json; -} interface StringMap { [key: string]: T; diff --git a/yarn.lock b/yarn.lock index 2446eb2e3642c..17bb0ab71979d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16215,10 +16215,10 @@ typescript-fsa@^2.0.0, typescript-fsa@^2.5.0: resolved "https://registry.yarnpkg.com/typescript-fsa/-/typescript-fsa-2.5.0.tgz#1baec01b5e8f5f34c322679d1327016e9e294faf" integrity sha1-G67AG16PXzTDImedEycBbp4pT68= -typescript@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.3.tgz#4853b3e275ecdaa27f78fda46dc273a7eb7fc1c8" - integrity sha512-kk80vLW9iGtjMnIv11qyxLqZm20UklzuR2tL0QAnDIygIUIemcZMxlMWudl9OOt76H3ntVzcTiddQ1/pAAJMYg== +typescript@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.1.3.tgz#01b70247a6d3c2467f70c45795ef5ea18ce191d5" + integrity sha512-+81MUSyX+BaSo+u2RbozuQk/UWx6hfG0a5gHu4ANEM4sU96XbuIyAB+rWBW1u70c6a5QuZfuYICn3s2UjuHUpA== ua-parser-js@^0.7.18, ua-parser-js@^0.7.9: version "0.7.18"