DoubleTrade / lit-datatable

lit-datatable is a material design implementation of a data table, powered by lit-element.
Apache License 2.0
57 stars 12 forks source link

Build not working #30

Closed rodriguesgm closed 3 years ago

rodriguesgm commented 3 years ago

After adding this lib to my project I'm having those errors when building it.

Adding "skipLibCheck": true to my tsconfig makes it work.

Any idea why I'm having those errors?

~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@doubletrade/lit-datatable/localize.d.ts:108:1466 - error TS2536: Type 'K_4' cannot be used to index type 'HTMLElementTagNameMap'.

108         getElementsByTagName<K_4 extends "object" | "dom-module" | "template" | "header" | "paper-input" | "a" | "abbr" | "address" | "applet" | "area" | "article" | "aside" | "audio" | "b" | "base" | "basefont" | "bdi" | "bdo" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "dir" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "font" | "footer" | "form" | "frame" | "frameset" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "label" | "legend" | "li" | "link" | "main" | "map" | "mark" | "marquee" | "menu" | "meta" | "meter" | "nav" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "script" | "section" | "select" | "slot" | "small" | "source" | "span" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "paper-tooltip" | "paper-ripple" | "paper-icon-button" | "paper-icon-item" | "paper-item-body" | "lit-datatable-column" | "iron-meta" | "paper-dropdown-menu" | "paper-listbox" | "paper-item" | "lit-datatable-footer" | "lit-datatable">(qualifiedName: K_4): HTMLCollectionOf<HTMLElementTagNameMap[K_4]>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@doubletrade/lit-datatable/localize.d.ts:205:1438 - error TS2536: Type 'K_6' cannot be used to index type 'HTMLElementTagNameMap'.

205         querySelector<K_6 extends "object" | "dom-module" | "template" | "header" | "paper-input" | "a" | "abbr" | "address" | "applet" | "area" | "article" | "aside" | "audio" | "b" | "base" | "basefont" | "bdi" | "bdo" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "dir" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "font" | "footer" | "form" | "frame" | "frameset" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "label" | "legend" | "li" | "link" | "main" | "map" | "mark" | "marquee" | "menu" | "meta" | "meter" | "nav" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "script" | "section" | "select" | "slot" | "small" | "source" | "span" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "paper-tooltip" | "paper-ripple" | "paper-icon-button" | "paper-icon-item" | "paper-item-body" | "lit-datatable-column" | "iron-meta" | "paper-dropdown-menu" | "paper-listbox" | "paper-item" | "lit-datatable-footer" | "lit-datatable">(selectors: K_6): HTMLElementTagNameMap[K_6] | null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@doubletrade/lit-datatable/localize.d.ts:208:1452 - error TS2344: Type 'HTMLElementTagNameMap[K_8]' does not satisfy the constraint 'Node'.

208         querySelectorAll<K_8 extends "object" | "dom-module" | "template" | "header" | "paper-input" | "a" | "abbr" | "address" | "applet" | "area" | "article" | "aside" | "audio" | "b" | "base" | "basefont" | "bdi" | "bdo" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "dir" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "font" | "footer" | "form" | "frame" | "frameset" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "label" | "legend" | "li" | "link" | "main" | "map" | "mark" | "marquee" | "menu" | "meta" | "meter" | "nav" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "script" | "section" | "select" | "slot" | "small" | "source" | "span" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "paper-tooltip" | "paper-ripple" | "paper-icon-button" | "paper-icon-item" | "paper-item-body" | "lit-datatable-column" | "iron-meta" | "paper-dropdown-menu" | "paper-listbox" | "paper-item" | "lit-datatable-footer" | "lit-datatable">(selectors: K_8): NodeListOf<HTMLElementTagNameMap[K_8]>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@doubletrade/lit-datatable/localize.d.ts:208:1452 - error TS2536: Type 'K_8' cannot be used to index type 'HTMLElementTagNameMap'.

208         querySelectorAll<K_8 extends "object" | "dom-module" | "template" | "header" | "paper-input" | "a" | "abbr" | "address" | "applet" | "area" | "article" | "aside" | "audio" | "b" | "base" | "basefont" | "bdi" | "bdo" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "dir" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "font" | "footer" | "form" | "frame" | "frameset" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "label" | "legend" | "li" | "link" | "main" | "map" | "mark" | "marquee" | "menu" | "meta" | "meter" | "nav" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "script" | "section" | "select" | "slot" | "small" | "source" | "span" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "paper-tooltip" | "paper-ripple" | "paper-icon-button" | "paper-icon-item" | "paper-item-body" | "lit-datatable-column" | "iron-meta" | "paper-dropdown-menu" | "paper-listbox" | "paper-item" | "lit-datatable-footer" | "lit-datatable">(selectors: K_8): NodeListOf<HTMLElementTagNameMap[K_8]>;

I clone this repo and also tried to run npm run build, but I also get errors

helpers/ld-header-with-filter.ts:12:14 - error TS4094: Property '_valueHasChanged' of exported class expression may not be private or protected.

12 export class LdHeaderWithFilter extends Localize(LitElement) {
                ~~~~~~~~~~~~~~~~~~

helpers/ld-header-with-filter.ts:12:14 - error TS4094: Property 'adoptStyles' of exported class expression may not be private or protected.

12 export class LdHeaderWithFilter extends Localize(LitElement) {
                ~~~~~~~~~~~~~~~~~~

helpers/ld-header-with-filter.ts:12:14 - error TS4094: Property 'createRenderRoot' of exported class expression may not be private or protected.

12 export class LdHeaderWithFilter extends Localize(LitElement) {
                ~~~~~~~~~~~~~~~~~~

helpers/ld-header-with-filter.ts:12:14 - error TS4094: Property 'enableUpdating' of exported class expression may not be private or protected.

12 export class LdHeaderWithFilter extends Localize(LitElement) {
RoXuS commented 3 years ago

hi, let me check that. Thx.

RoXuS commented 3 years ago

I have no issue: image

What is your version of node?

rodriguesgm commented 3 years ago

Thanks for the help man. Node version is v12.15.0

RoXuS commented 3 years ago

try with 15.x ?

rodriguesgm commented 3 years ago

Same result with latest node

image

RoXuS commented 3 years ago

hi @rodriguesgm, fix by my last commit, can you test?

rodriguesgm commented 3 years ago

Yes, the build is working on this commit https://github.com/DoubleTrade/lit-datatable/commit/a139c739648689f9a73752c294b1a0ed9db35d96 thanks a lot

tested with node 12

if you want to release a tag for that :)

RoXuS commented 3 years ago

done, thx ^^