Comments (3)
I've finally had a chance to look at this. There are several things going on here.
- The TypeScript declarations in
ListBox.d.ts
was missingSelectedValueAPIMixin
, the mixin that defines thevalue
property. I've checked in a fix for that in the main branch. - The render method isn't something that's exposed with a string name "render", it's defined with a
Symbol
called internal.render. For a long time, TypeScript had problems with Symbol-keyed methods like the ones Elix uses, so the Elix code base resorted to some shenanigans that, as a side effect, convinced TypeScript that there is a method called_render
. I believe TypeScript has improved its support for Symbol-keyed methods, so it may be possible to drop those shenanigans. - Some of the plain components like PlainListBox are missing a .d.ts file. I've just checked in one for PlainListBox, and this partially addresses the problem. Using what's on the main branch, it should now be possible to get type information for an import from
elix/src/base/ListBox.js
orelix/src/plain/PlainListBox.js
. - But there's still something preventing the list box types from going all the way through to an import from
elix/define/ListBox.js
. That's puzzling, as it is possible to get types forelix/define/DateComboBox.js
, and as far as I can tell both the list box and date combo box are defined in exactly the same way.
I'd investigate further, but I really don't have much to go on.
from elix.
https://codesandbox.io/s/elix-typescript-yeprli
from elix.
This seems to work - import types from the base folder. Not sure why that is necessary.
import type ListBox from "elix/src/base/ListBox";
Well maybe not. I can access the selectedIndex
and selectedItem
props, but not value
. There is a _render
but not a render
.
from elix.
Related Issues (20)
- Events(Tap,mousedown) Not triggered after moving from 7 to 12. HOT 4
- Inclusion of Elix Components in my designer demo HOT 3
- Issue summary, including the name of the relevant component or mixin HOT 1
- unhandled promises in the code HOT 3
- Location is not defined HOT 2
- How can I combine components and mixins? HOT 2
- Request: Improve documentation HOT 1
- How manually update input value get from NumberSpinBox ? HOT 3
- Inconsistent FilterComboBox whenClosed() result HOT 6
- FormElementMixin issue with Firefox 93 HOT 3
- Filtered ListComboBox loses attachement to text input HOT 5
- Input component does not allow "type" attribute HOT 2
- Carousel content can overflow (min-width: auto for flex) HOT 2
- Carousel / SlidingStageContent does not support fixed-positioned content such as DropdownList / Popup HOT 1
- Typescript "noImplicitAny" fails on method attributeChangedCallback in shared.d.ts
- Carousel not compiling to library HOT 4
- scss file is not supported, how we can provide support with scss HOT 2
- Wrong link in GitHub's "About" section HOT 1
- MenuItem and DropdownList, checkmark icon should be optional HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elix.