Skip to content

Migrate index pattern server side to typescript#43155

Closed
wylieconlon wants to merge 1 commit intoelastic:masterfrom
wylieconlon:typescript-indexpattern-server
Closed

Migrate index pattern server side to typescript#43155
wylieconlon wants to merge 1 commit intoelastic:masterfrom
wylieconlon:typescript-indexpattern-server

Conversation

@wylieconlon
Copy link
Copy Markdown
Contributor

Summary

This is still a WIP change

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@wylieconlon wylieconlon added the Feature:Data Views Data Views code and UI - index patterns before 8.0 label Aug 12, 2019
}
},
},
};
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@lukeelmers There's an error I can't figure about the Request types here, can you take a look?

* @type {IndexPatternsService}
*/
server.addMemoizedFactoryToRequest('getIndexPatternsService', request => {
server.addMemoizedFactoryToRequest('getIndexPatternsService', (request: Legacy.Request) => {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The addMemoizedFactoryToRequest code doesn't seem to be present in any existing type definitions, what is it supposed to do?

it('passes exact es response', async () => {
stubDeps({
esResponse: footballs[0]
esResponse: footballs[0],
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@lukeelmers These test files are completely filled with errors because the way the code is called here is totally different from the actual code- suggestions?

.reduce(
(acc, index, indexName) => acc.concat(indexName, Object.keys(index.aliases || {})),
[] as string[]
)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The .reduce( call here is throwing a number of errors related to lodash that I don't understand- maybe we need to split it out into chain(aliases.reduce(...))?

@elasticmachine
Copy link
Copy Markdown
Contributor

💔 Build Failed

@wylieconlon wylieconlon deleted the typescript-indexpattern-server branch October 29, 2019 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:Data Views Data Views code and UI - index patterns before 8.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants