Code Monkey home page Code Monkey logo

Comments (4)

pascalwilbrink avatar pascalwilbrink commented on September 13, 2024 1

Discussion from Slack

pascal wilbrink
10:51 AM
@openscd/open-scd-core is not exporting any Mixins (typed ones). Can this be fixed? Added a github issue here: #88

#88 Open-scd-core is not exporting any typed mixins.
Open-scd-core is not exporting any typed mixins.
Therefore I cannot use a mixin inside a plugin.
Can these be exported by the foundation as well?
https://github.com/[openscd/open-scd-core](https://github.com/openscd/open-scd-core)|openscd/open-scd-coreopenscd/open-scd-core | Feb 17th | Added by GitHub
white_check_mark
eyes
raised_hands

Christian
11:09 AM
Thanks, good idea!

pascal wilbrink
11:11 AM
and what about the OpenSCD class?

Christian
11:11 AM
I think we already export that from open-scd.ts, don't we? We could export the mixins from there as well. (edited)

pascal wilbrink
11:12 AM
https://www.npmjs.com/package/@openscd/open-scd-core?activeTab=explore
There's only a foundation.d.ts file in here, no open-scd.d.ts
11:13
import { OpenSCD } from '@openscd/open-scd-core/open-scd.js'; This doesn't work
import { OpenSCD } from '@openscd/open-scd-core'; Neither does this (edited)

Christian
11:22 AM
"compile": "tsc -b && tsc foundation.ts --declaration --emitDeclarationOnly --outDir dist", in package.json means we currently export types only for foundation.ts, we should add open-scd.ts to that command to fix that. We could do that in the same pull request which re-exports the mixins from open-scd.ts, what do you think?

from open-scd-core.

Sander3003 avatar Sander3003 commented on September 13, 2024

Let's refine this

from open-scd-core.

Sander3003 avatar Sander3003 commented on September 13, 2024

This won't be necessary anymore if the OpenSCD class is exported. The issue will arrise again if we start with CoMPAS based on OpenSCD-core.

from open-scd-core.

danyill avatar danyill commented on September 13, 2024

This is still an issue for me, I can't use open-scd-core in tests easily unless I either have the OpenSCD class (as a lit element with types) or I have mixins which I can wrap my plugin in.

So I'd like to re-open this and perhaps we can discuss at refinement.

from open-scd-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.