Skip to content

bug: misconfigured types in package.json #728

@joebowbeer

Description

@joebowbeer

Expected Behavior

@dapr/dapr should provide TypeScript types.

Actual Behavior

Could not find a declaration file for module '@dapr/dapr'.

[{
	"resource": "/workspaces/dapr-testcontainer-node/src/DaprContainer.test.ts",
	"owner": "typescript",
	"code": "7016",
	"severity": 8,
	"message": "Could not find a declaration file for module '@dapr/dapr'. '/workspaces/dapr-testcontainer-node/node_modules/@dapr/dapr/index.js' implicitly has an 'any' type.",
	"source": "ts",
	"startLineNumber": 18,
	"startColumn": 38,
	"endLineNumber": 18,
	"endColumn": 50,
	"origin": "extHost2"
}]

Steps to Reproduce the Problem

In thedapr/testcontainer-node repo, I see a red squiggly line on the @dapr/dapr import in DaprContainer.test.ts.

The misconfiguration is apparent here:

https://www.npmjs.com/package/@dapr/dapr/v/3.6.1?activeTab=code

Note that types refers to a folder that does not exist:

  "types": "./build/index.d.ts",

Suggested fix:

  "types": "./index.d.ts",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions