Skip to content
This repository has been archived by the owner on Nov 26, 2018. It is now read-only.

Troubles using casting and current typings. #9

Open
Johnz86 opened this issue Jan 3, 2017 · 1 comment
Open

Troubles using casting and current typings. #9

Johnz86 opened this issue Jan 3, 2017 · 1 comment

Comments

@Johnz86
Copy link

Johnz86 commented Jan 3, 2017

I have troubles to reuse the project with typescript.
If I follow default examples then SolrClient typing is missing getHandlers();
If I want to use the component lego, then I need to cast.
const TextSearch = defaultComponentPack.searchFields.text as any;
Even then I have trouble to access correctly.
state.query.searchFields and state.results.docs

How to use Component Lego with typescript, can you make some example?

@renevanderark
Copy link
Collaborator

Dear Johnz86,

I have to admit I added the typescript typings as a bit of an experiment. At the time we were considering porting to typescript and indeed I did struggle with the typings for custom components. I will have to put this issue on hold for today, but I will try and find the time this and next week to improve the typings and get it up and running (no promises though).

Should you feel inclined to improve the typings yourself I will welcome any pull request.

Happy new year & best wishes,
René

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants