-
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
Prepare for TS 3.7 upgrade #47794
Prepare for TS 3.7 upgrade #47794
Changes from all commits
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 |
---|---|---|
|
@@ -61,7 +61,7 @@ function isWhitelistedHostnameInUri(config: ActionsConfigType, uri: string): boo | |
tryCatch(() => new URL(uri)), | ||
map(url => url.hostname), | ||
mapNullable(hostname => isWhitelisted(config, hostname)), | ||
getOrElse(() => false) | ||
getOrElse<boolean>(() => false) | ||
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. ℹ️ It infers the generic type |
||
); | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
*/ | ||
|
||
import { AlertInstance } from './lib'; | ||
import { AlertTypeRegistry } from './alert_type_registry'; | ||
import { AlertTypeRegistry as OrigAlertTypeRegistry } from './alert_type_registry'; | ||
import { PluginSetupContract, PluginStartContract } from './plugin'; | ||
import { SavedObjectAttributes, SavedObjectsClientContract } from '../../../../../src/core/server'; | ||
|
||
|
@@ -95,4 +95,4 @@ export interface AlertingPlugin { | |
start: PluginStartContract; | ||
} | ||
|
||
export type AlertTypeRegistry = PublicMethodsOf<AlertTypeRegistry>; | ||
export type AlertTypeRegistry = PublicMethodsOf<OrigAlertTypeRegistry>; | ||
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. ℹ️ The usual 3.7 issue, that you cannot have an import and export with the same name (but different values) in one file anymore. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,6 +96,7 @@ declare module '@elastic/eui' { | |
message?: any; | ||
rowProps?: any; | ||
cellProps?: any; | ||
responsive?: boolean; | ||
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 was just used somewhere, and I honestly have no idea how this didn't fail in the current TS . |
||
}; | ||
export const EuiInMemoryTable: React.SFC<EuiInMemoryTableProps>; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -299,9 +299,7 @@ describe('ReindexActions', () => { | |
}); | ||
|
||
describe('runWhileConsumerLocked', () => { | ||
Object.keys(IndexGroup).forEach(typeKey => { | ||
const consumerType = IndexGroup[typeKey as any] as IndexGroup; | ||
|
||
Object.entries(IndexGroup).forEach(([typeKey, consumerType]) => { | ||
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. ℹ️ The |
||
describe(`IndexConsumerType.${typeKey}`, () => { | ||
it('creates the lock doc if it does not exist and executes callback', async () => { | ||
expect.assertions(3); | ||
|
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.
ℹ️ It complains that
{ viewMode }
is missingloading
, because I think it cannot automatically infer the generic type here, due to theif
(it actually infers it tonever
).