alicewriteswrongs / stencil-custom-elements-repro

small repro case

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

defineCustomElements type issue repro

This project showcases an issue with the typing for defineCustomElements.

The repro includes a Stencil project and a project which imports and uses that project. The importing project includes a typescript file (test.ts) which typechecks but which fails at runtime, showing that the types are not accurate!

To test it out do:

npm install
npm run build
npm start

you should see a console like like

Uncaught TypeError: Cannot read properties of undefined (reading 'then')
    at test.js:763:25
    at test.js:766:3

even though if you open up packages/importing-package/test.ts you won't see any errors in the editor.

About

small repro case


Languages

Language:TypeScript 82.6%Language:HTML 16.9%Language:CSS 0.6%