Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add typings for mocha #30190

Closed
wants to merge 10 commits into from
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@
"@types/listr": "^0.13.0",
"@types/lodash": "^3.10.1",
"@types/minimatch": "^2.0.29",
"@types/mocha": "^5.2.5",
spalger marked this conversation as resolved.
Show resolved Hide resolved
"@types/moment-timezone": "^0.5.8",
"@types/mustache": "^0.8.31",
"@types/node": "^10.12.12",
Expand Down
38 changes: 21 additions & 17 deletions packages/kbn-config-schema/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"declaration": true,
"declarationDir": "./target/types",
"outDir": "./target/out",
"stripInternal": true,
"declarationMap": true
},
"include": [
"./types/joi.d.ts",
"./src/**/*.ts"
],
"exclude": [
"target"
]
}
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and the other config files were updated to use different line endings, please update your git config to preserve the line endings that were in the file: https://help.github.com/articles/dealing-with-line-endings/#global-settings-for-line-endings

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also recommend installing the editorconfig plugin for your editor so it will automatically pickup configuration files like https://github.com/elastic/kibana/blob/master/.editorconfig

"extends": "../../tsconfig.json",
"compilerOptions": {
"declaration": true,
"declarationDir": "./target/types",
"outDir": "./target/out",
"stripInternal": true,
"declarationMap": true,
"types": [
"jest",
"node"
]
},
"include": [
"./types/joi.d.ts",
"./src/**/*.ts"
],
"exclude": [
"target"
]
}
36 changes: 20 additions & 16 deletions packages/kbn-i18n/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
{
"extends": "../../tsconfig.json",
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"types/intl_format_cache.d.ts",
"types/intl_relativeformat.d.ts"
],
"exclude": [
"target"
],
"compilerOptions": {
"declaration": true,
"declarationDir": "./target/types",
}
}
{
"extends": "../../tsconfig.json",
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"types/intl_format_cache.d.ts",
"types/intl_relativeformat.d.ts"
],
"exclude": [
"target"
],
"compilerOptions": {
"declaration": true,
"declarationDir": "./target/types",
"types": [
"jest",
"node"
]
}
}
26 changes: 16 additions & 10 deletions packages/kbn-pm/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
{
"extends": "../../tsconfig.json",
"exclude": [
"dist"
],
"include": [
"./src/**/*.ts",
"./types/index.d.ts"
]
}
{
"extends": "../../tsconfig.json",
"exclude": [
"dist"
],
"include": [
"./src/**/*.ts",
"./types/index.d.ts"
],
"compilerOptions": {
"types": [
"jest",
"node"
]
}
}
8 changes: 7 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@
// Provide full support for iterables in for..of, spread and destructuring when targeting ES5 or ES3.
"downlevelIteration": true,
// import tslib helpers rather than inlining helpers for iteration or spreading, for instance
"importHelpers": true
"importHelpers": true,
// adding global typings
"types": [
"node",
"jest",
"react"
]
},
"include": [
"kibana.d.ts",
Expand Down
30 changes: 17 additions & 13 deletions tsconfig.types.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"declaration": true,
"declarationDir": "./target/types",
"stripInternal": true,
"emitDeclarationOnly": true,
"declarationMap": true
},
"include": [
"./src/type_exports.ts"
]
}
{
"extends": "./tsconfig",
"compilerOptions": {
"declaration": true,
"declarationDir": "./target/types",
"stripInternal": true,
"emitDeclarationOnly": true,
"declarationMap": true,
"types": [
"node",
"jest"
]
},
"include": [
"./src/type_exports.ts"
]
}