-
-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
while the JavaScript works as expected,
downstream users of lately-deprecated functions (the ones that were moved to "contrib" area) might find their typescript linters/compilers complaining about some re-exports being not a type, but a const.
example: https://github.com/CycloneDX/cyclonedx-esbuild/actions/runs/19877209546/job/56967254145#step:5:21
error TS2749: 'CDX.Builders.FromNodePackageJson.ComponentBuilder' refers to a value, but is being used as a type here. Did you mean 'typeof CDX.Builders.FromNodePackageJson.ComponentBuilder'?
this happens only if the respective symbol is used as a type, for any other access there is no issue.
const extRefFac= new CDX.Contrib.FromNodePackageJson.Factories.ExternalReferenceFactory()
const a = new CDX.Builders.FromNodePackageJson.ToolBuilder(extRefFac) // no issue
const b: CDX.Builders.FromNodePackageJson.ToolBuilder = a // issue
// error TS2749: 'CDX.Builders.FromNodePackageJson.ToolBuilder' refers to a value, but is being used as a type here. Did you mean 'typeof CDX.Builders.FromNodePackageJson.ToolBuilder'?
// 93 const b: CDX.Builders.FromNodePackageJson.ToolBuilder = a
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working