Fix some type issues in x-pack/test_serverless#167346
Conversation
|
Pinging @elastic/kibana-operations (Team:Operations) |
| */ | ||
| export const login: CyLoginTask = ( | ||
| user: ServerlessRoleName | 'elastic' = 'soc_manager' | ||
| user: ServerlessRoleName | 'elastic' = ServerlessRoleName.SOC_MANAGER |
x-pack/test_serverless/functional/test_suites/security/cypress/tasks/login.ts
Outdated
Show resolved
Hide resolved
x-pack/test_serverless/functional/test_suites/observability/cypress/support/commands.ts
Outdated
Show resolved
Hide resolved
optional chaining is safer in these cases, and the accepting function doesn't care about the resulting types Co-authored-by: Thomas Watson <w@tson.dk>
| export interface User { | ||
| username: string; | ||
| password: string; | ||
| description?: string; | ||
| roles: string[]; | ||
| } |
There was a problem hiding this comment.
I can't see that User is used outside of this file?
There was a problem hiding this comment.
I'm still verifying these, but I these kinds of "export" additions were a kind of typescript errors that were something like an inferred type was private - these additions fixed those errors, but now that I'm re-verifying, both User and CommonSavedObjectAttributes works without export, so I'm puzzled 😕
There was a problem hiding this comment.
IDE TypeScript errors work in mysterious ways 🤷
There was a problem hiding this comment.
it wasn't an IDE, it was through the typecheck command. But it no longer seems to be present, so we can undo these, or keep them
| export interface CommonSavedObjectAttributes { | ||
| id?: string | null; | ||
| created_at?: string | null; | ||
| updated_at?: string | null; | ||
| version?: string | null; | ||
| [key: string]: unknown; | ||
| } |
There was a problem hiding this comment.
I can't see that CommonSavedObjectAttributes is used outside of this file?
|
@elasticmachine merge upstream |
💔 Build FailedFailed CI StepsTest Failures
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
Summary
We're breaking #166813 up into smaller PRs in the interest of getting PRs through sooner for type fixes. These are the changes for
x-pack/test_serverless.Reviewers
There are no code owners for these files, so I'm using the recently edited suggestions