-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
TypeScript project references for infra plugin #90118
Changes from all commits
84f008f
94ebe0d
041cb94
f09c6e9
c8f9168
197d58e
459c5c0
b8741f5
18c6d53
e01ffff
feb6854
8cc9eed
a5e26d6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,19 +48,19 @@ const wrapWithSharedState = () => { | |
return null; | ||
} | ||
|
||
private getTitle(title: TitleProp) { | ||
public getTitle(title: TitleProp) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is returning an anonymous class expression so |
||
return typeof title === 'function' ? title(titles[this.state.index - 1]) : title; | ||
} | ||
|
||
private pushTitle(title: string) { | ||
public pushTitle(title: string) { | ||
titles[this.state.index] = title; | ||
} | ||
|
||
private removeTitle() { | ||
public removeTitle() { | ||
titles.pop(); | ||
} | ||
|
||
private updateDocumentTitle() { | ||
public updateDocumentTitle() { | ||
const title = (titles[titles.length - 1] || '') + TITLE_SUFFIX; | ||
if (title !== document.title) { | ||
document.title = title; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ const initialState = { | |
|
||
type State = Readonly<typeof initialState>; | ||
|
||
export const CustomFieldPanel = class extends React.PureComponent<Props, State> { | ||
export class CustomFieldPanel extends React.PureComponent<Props, State> { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Export a named class instead of expression. (TS4094/microsoft/TypeScript#30355) |
||
public static displayName = 'CustomFieldPanel'; | ||
public readonly state: State = initialState; | ||
public render() { | ||
|
@@ -86,4 +86,4 @@ export const CustomFieldPanel = class extends React.PureComponent<Props, State> | |
private handleFieldSelection = (selectedOptions: SelectedOption[]) => { | ||
this.setState({ selectedOptions }); | ||
}; | ||
}; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"extends": "../../../tsconfig.base.json", | ||
"compilerOptions": { | ||
"composite": true, | ||
"outDir": "./target/types", | ||
"emitDeclarationOnly": true, | ||
"declaration": true, | ||
"declarationMap": true | ||
}, | ||
"include": [ | ||
"../../typings/**/*", | ||
"common/**/*", | ||
"public/**/*", | ||
"scripts/**/*", | ||
"server/**/*", | ||
"types/**/*" | ||
], | ||
"references": [ | ||
{ "path": "../../../src/core/tsconfig.json" }, | ||
{ "path": "../../../src/plugins/data/tsconfig.json" }, | ||
{ "path": "../../../src/plugins/embeddable/tsconfig.json" }, | ||
{ "path": "../../../src/plugins/home/tsconfig.json" }, | ||
{ "path": "../../../src/plugins/kibana_utils/tsconfig.json" }, | ||
{ "path": "../../../src/plugins/kibana_react/tsconfig.json" }, | ||
{ "path": "../../../src/plugins/usage_collection/tsconfig.json" }, | ||
{ "path": "../../../src/plugins/vis_type_timeseries/tsconfig.json" }, | ||
{ "path": "../data_enhanced/tsconfig.json" }, | ||
{ "path": "../alerts/tsconfig.json" }, | ||
{ "path": "../features/tsconfig.json" }, | ||
{ "path": "../license_management/tsconfig.json" }, | ||
{ "path": "../ml/tsconfig.json" }, | ||
{ "path": "../observability/tsconfig.json" }, | ||
{ "path": "../spaces/tsconfig.json" }, | ||
{ "path": "../triggers_actions_ui/tsconfig.json" } | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of TS4023 (microsoft/TypeScript#5711) some additional interfaces need to be exported because we're emitting declarations: