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

Upgrade Typescript to 4.3.5 #104470

Merged
merged 117 commits into from
Dec 3, 2021
Merged
Show file tree
Hide file tree
Changes from 112 commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
67b2548
update ts version to 4.3.5
mshustov Feb 13, 2021
c49094d
Fix some typed-react-router/apm ts errors
dgieselaar Jul 21, 2021
7892e6f
Fix: apm ts error
dgieselaar Jul 21, 2021
29044a3
[@kbn/monaco] Transpile for web
Jul 22, 2021
5c0d31c
Resolve property used before initialization
Jul 22, 2021
9d69f94
Update snapshot
Aug 9, 2021
3837610
dont use broken KnownHeaders helper
mshustov Aug 13, 2021
5d384f5
fix errors in Core
mshustov Aug 13, 2021
e2c53d5
Merge remote-tracking branch 'upstream/master' into ts-4-3-4
Aug 24, 2021
9e8e7df
More fixes
Aug 25, 2021
b041686
Revert accidental change
Aug 25, 2021
801ce46
More fixes
Aug 25, 2021
ce3215c
More fixes
Aug 26, 2021
2c9e422
Merge remote-tracking branch 'upstream/master' into ts-4-3-4
Aug 26, 2021
c7f19a4
Fix TS errors in Upgrade Assistant and Index Management mappings editor.
cjcenizal Aug 26, 2021
924c0c0
Resolve type error reported by https://github.com/elastic/kibana/pull…
justinkambic Sep 1, 2021
b882621
Solve TS problems
stratoula Sep 1, 2021
9b6f3c4
fix kibana-app-services types for TS 4.3.5
jloleysens Sep 1, 2021
c569d3e
Fix Fleet TS errors
kpollich Sep 1, 2021
a6c8e07
Implemented better fix for Uptime type issues.
justinkambic Sep 1, 2021
d4bc9e0
Merge pull request #6 from stratoula/fix-vis-editors-failures
tylersmalley Sep 1, 2021
930bf97
Update fleet headers type
kpollich Sep 1, 2021
720b950
Merge remote-tracking branch 'upstream/master' into ts-4-3-4
Sep 1, 2021
8bf1ced
Fixes
Sep 1, 2021
949bd50
APM Type fixes
dgieselaar Sep 6, 2021
5f857c0
Merge remote-tracking branch 'upstream/master' into ts-4-3-4
Sep 7, 2021
c28fbe4
More fixes
Sep 14, 2021
297c1bb
Merge remote-tracking branch 'upstream/master' into ts-4-3-4
Sep 14, 2021
3a6f7f6
Apply maps fix by Thomas
Sep 14, 2021
693383a
Another update from Thomas
Sep 14, 2021
27fd24d
fix type on search strategy in security solutions
XavierM Sep 15, 2021
c6b5475
Fix template literal types used in siem
kqualters-elastic Sep 15, 2021
d23dd2f
Merge pull request #7 from XavierM/ts-4-3-5
tylersmalley Sep 15, 2021
aa2ef4a
Merge pull request #8 from kqualters-elastic/ts-4-3-4
tylersmalley Sep 15, 2021
bd02f80
Fixes
Sep 15, 2021
dcea043
Fix resolver side effect simulator type
kqualters-elastic Sep 15, 2021
be6f865
Merge pull request #9 from kqualters-elastic/ts-4-3-4
tylersmalley Sep 15, 2021
e8dcba7
remove updatedflow boolean
parkiino Sep 23, 2021
93dc843
Merge remote-tracking branch 'upstream/master' into ts-4-3-4
Oct 1, 2021
7cd8af6
Merge remote-tracking branch 'upstream/master' into ts-4-3-4
Oct 7, 2021
1e54200
Fixes and ignores
Oct 7, 2021
355d9e6
Merge remote-tracking branch 'tylersmalley/ts-4-3-4' into ts-4-3-4
parkiino Oct 12, 2021
7f8adc3
Merge remote-tracking branch 'upstream/master' into ts-4-3-4
Oct 13, 2021
33574fc
skip
Oct 13, 2021
8ac8edf
Merge remote-tracking branch 'upstream/master' into ts-4-3-4
Oct 15, 2021
05c4ce8
ESLint updates - and not use declare for now
Oct 16, 2021
85994f4
Update API docs
Oct 16, 2021
a5c7f7a
Merge remote-tracking branch 'upstream/main' into ts-4-3-4
Nov 1, 2021
6e7834f
Merge remote-tracking branch 'upstream/main' into ts-4-3-4
Nov 1, 2021
7059a11
Updates
Nov 1, 2021
4fa7f9d
restore eslint ignore
Nov 1, 2021
2a2d248
remove ts ignores for security solution mgmt
parkiino Nov 2, 2021
57c0d2b
Merge branch 'ts-4-3-4' of github.com:parkiino/kibana into ts-4-3-4
parkiino Nov 2, 2021
cc86f85
Merge remote-tracking branch 'upstream/main' into ts-4-3-4
Nov 4, 2021
71798c8
Removes ResizeObserver type polyfill
Nov 5, 2021
3aa2fcb
Merge pull request #10 from parkiino/ts-4-3-4
tylersmalley Nov 8, 2021
24897fa
Revert "Removes ResizeObserver type polyfill"
Nov 8, 2021
4982f40
Removes resize-observer-polyfill types only
Nov 8, 2021
a200694
Merge remote-tracking branch 'upstream/main' into ts-4-3-4
Nov 18, 2021
4174720
Fix api docs test failures
brianseeders Nov 18, 2021
809f798
Update API docs
Nov 18, 2021
d35528a
Merge branch 'ts-4-3-4' of https://github.com/tylersmalley/kibana int…
brianseeders Nov 18, 2021
17bace0
Merge branch 'ts-4-3-4' of https://github.com/tylersmalley/kibana int…
brianseeders Nov 18, 2021
e333fdf
Committing change from #118848
Nov 18, 2021
fdced85
Merge branch 'ts-4-3-4' of github.com:tylersmalley/kibana into ts-4-3-4
Nov 18, 2021
a7ceb1c
Merge remote-tracking branch 'upstream/main' into ts-4-3-4
Nov 19, 2021
d634294
expect-error
Nov 19, 2021
0e8b4a2
missed conflict
Nov 19, 2021
74d17e4
Spencer updates
Nov 20, 2021
e8b287b
Updates
Nov 24, 2021
919f1f3
Merge remote-tracking branch 'upstream' into ts-4-3-4
Nov 24, 2021
8c07018
Update yarn.lock
brianseeders Nov 24, 2021
8db01ef
Commit docs changes
brianseeders Nov 24, 2021
66a566e
Ignore some type errors
brianseeders Nov 24, 2021
8480502
Updates
Nov 24, 2021
ce0ea5f
Merge remote-tracking branch 'upstream/main' into ts-4-3-4
Nov 24, 2021
c002a41
Change to ts-ignore
Nov 24, 2021
9513d13
Fix EUI type
Nov 24, 2021
ae76664
Update snapshots
Nov 29, 2021
c6dcf50
Fix more type problems
brianseeders Nov 29, 2021
bce6445
Merge branch 'ts-4-3-4' of https://github.com/tylersmalley/kibana int…
brianseeders Nov 29, 2021
b1756f3
Merge branch 'main' of github.com:elastic/kibana into pr/104470
Nov 29, 2021
aa34a9a
fixup some issues
Nov 30, 2021
20a1822
Merge branch 'main' of github.com:elastic/kibana into pr/104470
Nov 30, 2021
8d868e8
Revert "Removes resize-observer-polyfill types only"
Nov 30, 2021
638be92
Patch resize-observer-polyfill types
Nov 30, 2021
a6098e6
Fix types
Nov 30, 2021
805d96f
update core docs
Nov 30, 2021
5f9f214
Merge branch 'ts-4-3-4' of github.com:tylersmalley/kibana into pr/104470
Nov 30, 2021
375d66f
More fixes
Nov 30, 2021
5f45a24
avoid excessive union type by using basic iteration
Nov 30, 2021
9235871
Merge branch 'main' of github.com:elastic/kibana into pr/104470
Nov 30, 2021
6259e15
remove explicit inclusion of resize-observer-polyfill types
Nov 30, 2021
16fe24b
remove expect-error for missing declare
Nov 30, 2021
4a30b12
stop passing --verbose to tsc without --build
Nov 30, 2021
cf8fa9d
just re-export global ResizeObserver type in shim
Nov 30, 2021
25dda80
stop including resize-observer-polyfill types in secSol
Nov 30, 2021
a9b78e9
remove unnecessary type magic to reduce union explosion
Dec 1, 2021
49b2590
Merge branch 'main' of github.com:elastic/kibana into pr/104470
Dec 1, 2021
1c76872
expect errors caused by router changes which don't seem mission criti…
Dec 1, 2021
bfc7d14
update test to the attributes actually change
Dec 1, 2021
dd5e777
update api_docs test snapshot
Dec 1, 2021
cc52b77
Merge branch 'main' of github.com:elastic/kibana into pr/104470
Dec 1, 2021
f2ba37f
Merge branch 'main' of github.com:elastic/kibana into pr/104470
Dec 1, 2021
f54f6b1
revert test update and skip with link to issue
Dec 1, 2021
44cb2b3
Merge branch 'main' of github.com:elastic/kibana into pr/104470
Dec 1, 2021
dc24afd
fixes after merging main
Dec 1, 2021
3d87631
Merge branch 'main' of github.com:elastic/kibana into pr/104470
Dec 1, 2021
c01bfab
Merge branch 'main' of github.com:elastic/kibana into pr/104470
Dec 1, 2021
2486436
ignore another union explosion
Dec 2, 2021
921bfc1
use ignore for expression that flip-flops
Dec 2, 2021
47068e2
Restore Headers definition
Dec 2, 2021
ae216ef
Update associated API docs
Dec 2, 2021
65adb76
Removed unnecessary change
Dec 2, 2021
cb0f129
Add link to Github issue
Dec 2, 2021
417d703
Bump globby/fast-glob to consolidate fast-glob
Dec 2, 2021
c82a4de
Update @kbn/pm dist
Dec 2, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ Constructs a new instance of the `ScopedHistory` class
<b>Signature:</b>

```typescript
constructor(parentHistory: History, basePath: string);
constructor(parentHistory: History<HistoryLocationState>, basePath: string);
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| parentHistory | History | |
| parentHistory | History&lt;HistoryLocationState&gt; | |
| basePath | string | |

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Add a block prompt requesting user confirmation when navigating away from the cu
<b>Signature:</b>

```typescript
block: (prompt?: string | boolean | History.TransitionPromptHook<HistoryLocationState> | undefined) => UnregisterCallback;
block: (prompt?: string | boolean | TransitionPromptHook<HistoryLocationState> | undefined) => UnregisterCallback;
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Creates a `ScopedHistory` for a subpath of this `ScopedHistory`<!-- -->. Useful
<b>Signature:</b>

```typescript
createSubHistory: <SubHistoryLocationState = unknown>(basePath: string) => ScopedHistory<SubHistoryLocationState>;
createSubHistory: (basePath: string) => ScopedHistory<HistoryLocationState>;
```
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ export declare class ScopedHistory<HistoryLocationState = unknown> implements Hi
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [action](./kibana-plugin-core-public.scopedhistory.action.md) | | Action | The last action dispatched on the history stack. |
| [block](./kibana-plugin-core-public.scopedhistory.block.md) | | (prompt?: string \| boolean \| History.TransitionPromptHook&lt;HistoryLocationState&gt; \| undefined) =&gt; UnregisterCallback | Add a block prompt requesting user confirmation when navigating away from the current page. |
| [block](./kibana-plugin-core-public.scopedhistory.block.md) | | (prompt?: string \| boolean \| TransitionPromptHook&lt;HistoryLocationState&gt; \| undefined) =&gt; UnregisterCallback | Add a block prompt requesting user confirmation when navigating away from the current page. |
| [createHref](./kibana-plugin-core-public.scopedhistory.createhref.md) | | (location: LocationDescriptorObject&lt;HistoryLocationState&gt;, { prependBasePath }?: { prependBasePath?: boolean \| undefined; }) =&gt; Href | Creates an href (string) to the location. If <code>prependBasePath</code> is true (default), it will prepend the location's path with the scoped history basePath. |
| [createSubHistory](./kibana-plugin-core-public.scopedhistory.createsubhistory.md) | | &lt;SubHistoryLocationState = unknown&gt;(basePath: string) =&gt; ScopedHistory&lt;SubHistoryLocationState&gt; | Creates a <code>ScopedHistory</code> for a subpath of this <code>ScopedHistory</code>. Useful for applications that may have sub-apps that do not need access to the containing application's history. |
| [createSubHistory](./kibana-plugin-core-public.scopedhistory.createsubhistory.md) | | (basePath: string) =&gt; ScopedHistory&lt;HistoryLocationState&gt; | Creates a <code>ScopedHistory</code> for a subpath of this <code>ScopedHistory</code>. Useful for applications that may have sub-apps that do not need access to the containing application's history. |
| [go](./kibana-plugin-core-public.scopedhistory.go.md) | | (n: number) =&gt; void | Send the user forward or backwards in the history stack. |
| [goBack](./kibana-plugin-core-public.scopedhistory.goback.md) | | () =&gt; void | Send the user one location back in the history stack. Equivalent to calling [ScopedHistory.go(-1)](./kibana-plugin-core-public.scopedhistory.go.md)<!-- -->. If no more entries are available backwards, this is a no-op. |
| [goForward](./kibana-plugin-core-public.scopedhistory.goforward.md) | | () =&gt; void | Send the user one location forward in the history stack. Equivalent to calling [ScopedHistory.go(1)](./kibana-plugin-core-public.scopedhistory.go.md)<!-- -->. If no more entries are available forwards, this is a no-op. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [Headers\_2](./kibana-plugin-core-server.headers_2.md)

## Headers\_2 type
## Headers\_2 interface

Http request headers to read.

<b>Signature:</b>

```typescript
export declare type Headers = {
[header in KnownHeaders]?: string | string[] | undefined;
} & {
[header: string]: string | string[] | undefined;
};
export interface Headers
```
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,32 @@ Set of helpers used to create `KibanaResponse` to form HTTP response on an incom
kibanaResponseFactory: {
custom: <T extends string | Record<string, any> | Error | Buffer | Stream | {
message: string | Error;
attributes?: Record<string, any> | undefined;
attributes?: ResponseErrorAttributes | undefined;
} | undefined>(options: CustomHttpResponseOptions<T>) => KibanaResponse<T>;
badRequest: (options?: ErrorHttpResponseOptions) => KibanaResponse<ResponseError>;
unauthorized: (options?: ErrorHttpResponseOptions) => KibanaResponse<ResponseError>;
forbidden: (options?: ErrorHttpResponseOptions) => KibanaResponse<ResponseError>;
notFound: (options?: ErrorHttpResponseOptions) => KibanaResponse<ResponseError>;
conflict: (options?: ErrorHttpResponseOptions) => KibanaResponse<ResponseError>;
customError: (options: CustomHttpResponseOptions<ResponseError>) => KibanaResponse<ResponseError>;
badRequest: (options?: ErrorHttpResponseOptions) => KibanaResponse<string | Error | {
message: string | Error;
attributes?: ResponseErrorAttributes | undefined;
}>;
unauthorized: (options?: ErrorHttpResponseOptions) => KibanaResponse<string | Error | {
message: string | Error;
attributes?: ResponseErrorAttributes | undefined;
}>;
forbidden: (options?: ErrorHttpResponseOptions) => KibanaResponse<string | Error | {
message: string | Error;
attributes?: ResponseErrorAttributes | undefined;
}>;
notFound: (options?: ErrorHttpResponseOptions) => KibanaResponse<string | Error | {
message: string | Error;
attributes?: ResponseErrorAttributes | undefined;
}>;
conflict: (options?: ErrorHttpResponseOptions) => KibanaResponse<string | Error | {
message: string | Error;
attributes?: ResponseErrorAttributes | undefined;
}>;
customError: (options: CustomHttpResponseOptions<ResponseError>) => KibanaResponse<string | Error | {
message: string | Error;
attributes?: ResponseErrorAttributes | undefined;
}>;
redirected: (options: RedirectResponseOptions) => KibanaResponse<string | Record<string, any> | Buffer | Stream>;
ok: (options?: HttpResponseOptions) => KibanaResponse<string | Record<string, any> | Buffer | Stream>;
accepted: (options?: HttpResponseOptions) => KibanaResponse<string | Record<string, any> | Buffer | Stream>;
Expand Down
2 changes: 1 addition & 1 deletion docs/development/core/server/kibana-plugin-core-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [FeatureDeprecationDetails](./kibana-plugin-core-server.featuredeprecationdetails.md) | |
| [GetDeprecationsContext](./kibana-plugin-core-server.getdeprecationscontext.md) | |
| [GetResponse](./kibana-plugin-core-server.getresponse.md) | |
| [Headers\_2](./kibana-plugin-core-server.headers_2.md) | Http request headers to read. |
| [HttpAuth](./kibana-plugin-core-server.httpauth.md) | |
| [HttpResources](./kibana-plugin-core-server.httpresources.md) | HttpResources service is responsible for serving static &amp; dynamic assets for Kibana application via HTTP. Provides API allowing plug-ins to respond with: - a pre-configured HTML page bootstrapping Kibana client app - custom HTML page - custom JS script file. |
| [HttpResourcesRenderOptions](./kibana-plugin-core-server.httpresourcesrenderoptions.md) | Allows to configure HTTP response parameters |
Expand Down Expand Up @@ -261,7 +262,6 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [HandlerContextType](./kibana-plugin-core-server.handlercontexttype.md) | Extracts the type of the first argument of a [HandlerFunction](./kibana-plugin-core-server.handlerfunction.md) to represent the type of the context. |
| [HandlerFunction](./kibana-plugin-core-server.handlerfunction.md) | A function that accepts a context object and an optional number of additional arguments. Used for the generic types in [IContextContainer](./kibana-plugin-core-server.icontextcontainer.md) |
| [HandlerParameters](./kibana-plugin-core-server.handlerparameters.md) | Extracts the types of the additional arguments of a [HandlerFunction](./kibana-plugin-core-server.handlerfunction.md)<!-- -->, excluding the [HandlerContextType](./kibana-plugin-core-server.handlercontexttype.md)<!-- -->. |
| [Headers\_2](./kibana-plugin-core-server.headers_2.md) | Http request headers to read. |
| [HttpResourcesRequestHandler](./kibana-plugin-core-server.httpresourcesrequesthandler.md) | Extended version of [RequestHandler](./kibana-plugin-core-server.requesthandler.md) having access to [HttpResourcesServiceToolkit](./kibana-plugin-core-server.httpresourcesservicetoolkit.md) to respond with HTML or JS resources. |
| [HttpResourcesResponseOptions](./kibana-plugin-core-server.httpresourcesresponseoptions.md) | HTTP Resources response parameters |
| [HttpResponsePayload](./kibana-plugin-core-server.httpresponsepayload.md) | Data send to the client as a response payload. |
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"**/react-syntax-highlighter": "^15.3.1",
"**/react-syntax-highlighter/**/highlight.js": "^10.4.1",
"**/trim": "1.0.1",
"**/typescript": "4.1.3",
"**/typescript": "4.3.5",
"**/underscore": "^1.13.1",
"globby/fast-glob": "3.2.5"
},
Expand Down Expand Up @@ -538,7 +538,7 @@
"@types/hapi__inert": "^5.2.3",
"@types/has-ansi": "^3.0.0",
"@types/he": "^1.1.1",
"@types/history": "^4.7.3",
"@types/history": "^4.7.9",
"@types/hjson": "^2.4.2",
"@types/http-proxy": "^1.17.4",
"@types/http-proxy-agent": "^2.0.2",
Expand Down Expand Up @@ -822,9 +822,9 @@
"terser-webpack-plugin": "^4.2.3",
"tough-cookie": "^4.0.0",
"ts-loader": "^7.0.5",
"ts-morph": "^9.1.0",
"ts-morph": "^11.0.0",
"tsd": "^0.13.1",
"typescript": "4.1.3",
"typescript": "4.3.5",
tylersmalley marked this conversation as resolved.
Show resolved Hide resolved
"unlazy-loader": "^0.1.3",
"url-loader": "^2.2.0",
"val-loader": "^1.1.1",
Expand Down
2 changes: 0 additions & 2 deletions packages/kbn-alerts/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,11 @@ RUNTIME_DEPS = [
"@npm//@elastic/eui",
"@npm//enzyme",
"@npm//react",
"@npm//resize-observer-polyfill",
]

TYPES_DEPS = [
"//packages/kbn-i18n:npm_module_types",
"@npm//@elastic/eui",
"@npm//resize-observer-polyfill",
"@npm//tslib",
"@npm//@types/enzyme",
"@npm//@types/jest",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-alerts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"rootDir": "src",
"sourceMap": true,
"sourceRoot": "../../../../packages/kbn-alerts/src",
"types": ["jest", "node", "resize-observer-polyfill"]
"types": ["jest", "node"]
},
"include": ["src/**/*"],
}
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ it('Function inside interface has a label', () => {
expect(fn?.type).toBe(TypeKind.FunctionKind);
});

it('Test ReactElement signature', () => {
// FAILING: https://github.com/elastic/kibana/issues/120125
it.skip('Test ReactElement signature', () => {
const node = nodes.find((n) => getNodeName(n) === 'AReactElementFn');
expect(node).toBeDefined();
const def = buildApiDeclarationTopNode(node!, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function buildBasicApiDeclaration(node: Node, opts: BuildApiDecOpts): Api
signature: getSignature(node, opts.plugins, opts.log),
path: getSourceForNode(node),
deprecated,
removeBy: removeByTag ? removeByTag.getComment() : undefined,
removeBy: removeByTag ? removeByTag.getCommentText() : undefined,
};
return {
...apiDec,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ export function getJSDocs(node: Node): JSDoc[] | undefined {
export function getJSDocReturnTagComment(node: Node | JSDoc[]): TextWithLinks {
const tags = getJSDocTags(node);
const returnTag = tags.find((tag) => Node.isJSDocReturnTag(tag));
if (returnTag) return getTextWithLinks(returnTag.getComment());
if (returnTag) return getTextWithLinks(returnTag.getCommentText());
return [];
}

export function getJSDocParamComment(node: Node | JSDoc[], name: string): TextWithLinks {
const tags = getJSDocTags(node);
const paramTag = tags.find((tag) => Node.isJSDocParameterTag(tag) && tag.getName() === name);
if (paramTag) return getTextWithLinks(paramTag.getComment());
if (paramTag) return getTextWithLinks(paramTag.getCommentText());
return [];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ ${
**Code health stats**
| Public API count | Any count | Items lacking comments | Missing exports |
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
| ${pluginStats.apiCount} | ${pluginStats.isAnyType.length} | ${
pluginStats.missingComments.length
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ describe('Types', () => {
"section": "def-public.MyProps",
"text": "MyProps",
},
">",
", string | React.JSXElementConstructor<any>>",
]
`);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"label": "component",
"description": [],
"signature": [
"React.ComponentClass<{}, any> | React.FunctionComponent<{}> | undefined"
"React.ComponentType<{}> | undefined"
],
"path": "packages/kbn-docs-utils/src/api_docs/tests/__fixtures__/src/plugin_a/public/classes.ts",
"deprecated": false
Expand Down Expand Up @@ -1241,7 +1241,7 @@
"section": "def-public.MyProps",
"text": "MyProps"
},
">"
", string | React.JSXElementConstructor<any>>"
],
"path": "packages/kbn-docs-utils/src/api_docs/tests/__fixtures__/src/plugin_a/public/types.ts",
"deprecated": false,
Expand Down Expand Up @@ -2356,7 +2356,7 @@
"deprecated": false,
"children": [],
"returnComment": [
"The currently selected {@link SearchLanguage}"
"The currently selected {@link SearchLanguage }"
]
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Contact Kibana Core for questions regarding this plugin.

**Code health stats**

| Public API count | Any count | Items lacking comments | Missing exports |
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
| 131 | 1 | 71 | 2 |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Contact Kibana Core for questions regarding this plugin.

**Code health stats**

| Public API count | Any count | Items lacking comments | Missing exports |
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
| 131 | 1 | 71 | 2 |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Contact Kibana Core for questions regarding this plugin.

**Code health stats**

| Public API count | Any count | Items lacking comments | Missing exports |
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
| 2 | 0 | 2 | 0 |

Expand Down
1 change: 0 additions & 1 deletion packages/kbn-field-types/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ TYPES_DEPS = [
"@npm//@types/node",
"@npm//@types/node-forge",
"@npm//@types/testing-library__jest-dom",
"@npm//resize-observer-polyfill",
"@npm//@emotion/react",
"@npm//jest-styled-components",
]
Expand Down
2 changes: 0 additions & 2 deletions packages/kbn-optimizer/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ RUNTIME_DEPS = [
"@npm//node-sass",
"@npm//normalize-path",
"@npm//pirates",
"@npm//resize-observer-polyfill",
"@npm//rxjs",
"@npm//source-map-support",
"@npm//watchpack",
Expand All @@ -77,7 +76,6 @@ TYPES_DEPS = [
"@npm//jest-diff",
"@npm//lmdb-store",
"@npm//pirates",
"@npm//resize-observer-polyfill",
"@npm//rxjs",
"@npm//zlib",
"@npm//@types/compression-webpack-plugin",
Expand Down
1 change: 0 additions & 1 deletion packages/kbn-react-field/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ TYPES_DEPS = [
"@npm//@types/classnames",
"@npm//@types/react",
"@npm//@elastic/eui",
"@npm//resize-observer-polyfill",
]

jsts_transpiler(
Expand Down
1 change: 0 additions & 1 deletion packages/kbn-react-field/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"types": [
"jest",
"node",
"resize-observer-polyfill"
]
},
"include": [
Expand Down
2 changes: 0 additions & 2 deletions packages/kbn-securitysolution-autocomplete/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ RUNTIME_DEPS = [
"@npm//enzyme",
"@npm//moment",
"@npm//react",
"@npm//resize-observer-polyfill",
]

TYPES_DEPS = [
Expand All @@ -55,7 +54,6 @@ TYPES_DEPS = [
"@npm//@testing-library/react",
"@npm//@testing-library/react-hooks",
"@npm//moment",
"@npm//resize-observer-polyfill",
"@npm//@types/enzyme",
"@npm//@types/jest",
"@npm//@types/node",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-securitysolution-autocomplete/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"sourceMap": true,
"sourceRoot": "../../../../packages/kbn-securitysolution-autocomplete/src",
"rootDir": "src",
"types": ["jest", "node", "resize-observer-polyfill"]
"types": ["jest", "node"]
},
"include": ["src/**/*"],
}
6 changes: 4 additions & 2 deletions packages/kbn-storybook/src/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ function isHtmlPlugin(plugin: any): plugin is { options: { template: string } }
return !!(typeof plugin.options?.template === 'string');
}

function isBabelLoaderRule(rule: webpack.RuleSetRule): rule is webpack.RuleSetRule & {
interface BabelLoaderRule extends webpack.RuleSetRule {
use: webpack.RuleSetLoader[];
} {
}

function isBabelLoaderRule(rule: webpack.RuleSetRule): rule is BabelLoaderRule {
return !!(
rule.use &&
Array.isArray(rule.use) &&
Expand Down
5 changes: 2 additions & 3 deletions packages/kbn-test/src/jest/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ declare global {
interface Global {}
interface InspectOptions {}

interface ConsoleConstructor
extends console.ConsoleConstructor {}
interface ConsoleConstructor extends console.ConsoleConstructor {}
}
}
/* eslint-enable */
Expand All @@ -59,7 +58,7 @@ export function runJest(configName = 'jest.config.js') {
const cwd: string = process.env.INIT_CWD || process.cwd();

if (!argv.config) {
testFiles = argv._.splice(2).map((p) => resolve(cwd, p));
testFiles = argv._.splice(2).map((p) => resolve(cwd, p.toString()));
const commonTestFiles = commonBasePath(testFiles);
const testFilesProvided = testFiles.length > 0;

Expand Down
1 change: 1 addition & 0 deletions packages/kbn-typed-react-router-config/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ TYPES_DEPS = [
"@npm//query-string",
"@npm//utility-types",
"@npm//@types/jest",
"@npm//@types/history",
"@npm//@types/node",
"@npm//@types/react-router-config",
"@npm//@types/react-router-dom",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ describe('createRouter', () => {

const matches = router.matchRoutes('/', history.location);

// @ts-expect-error 4.3.5 upgrade - router doesn't seem able to merge properly when two routes match
expect(matches[1]?.match.params).toEqual({
query: {
rangeFrom: 'now-30m',
Expand All @@ -285,6 +286,7 @@ describe('createRouter', () => {

expect(matchedRoutes.length).toEqual(4);

// @ts-expect-error 4.3.5 upgrade - router doesn't seem able to merge properly when two routes match
expect(matchedRoutes[matchedRoutes.length - 1].match).toEqual({
isExact: true,
params: {
Expand Down
Loading