xxfast
06/12/2021, 2:48 AMcom.organisation.product.core
which has this kotlin class
@JSExport
class Service()
once exported with npm-publish
- when importing this from a typescript project it looks like
import {com} from "@organisation/core";
const Service = com.organisation.product.core.Service;
This kinda woks, but when you have another module (for example, com.organisation.product.feature
) they both end up sharing the com
import {com} from "@organisation/core";
import {com} from "@organisation/feature"; // not allowed
I know you can get around this with alias like
import {au as core} from "@organisation/core";
import {au as feature} from "@organisation/feature";
const Service = core.organisation.product.core.Service;
const FeatureService = login.organisation.product.feature.Service;
Is there a way to make these imports much nicer without losing my package structure from kotlin side?ephemient
06/12/2021, 3:12 AMimport {com: {organization: {product: {core}}}} from "@organization/core"
import {com: {organization: {product: {feature}}}} from "@organization/feature"
const com = {organization: {product: {core, feature}}}
would work but that may be too cumbersomernett
06/12/2021, 5:11 AMturansky
06/12/2021, 11:32 AMturansky
06/12/2021, 11:33 AMturansky
06/12/2021, 11:34 AMlibrary.export
optionturansky
06/12/2021, 11:48 AM