Skip to content

Package.json Type issues #101

@maccuaa

Description

@maccuaa

Describe the bug

Using the @mxenabled/web-widget-sdk in a TypeScript project causes TSC issues because the MX widget SDK package.json incorrectly lists the types.

Steps to reproduce

Install @mxenabled/web-widget-sdk in a TypeScript project.

** Error **

Could not find a declaration file for module '@mxenabled/web-widget-sdk'. '/Users/andrew.maccuaig/Projects/mx-lunch-money-sync/node_modules/@mxenabled/web-widget-sdk/dist/esm/index.js' implicitly has an 'any' type.
  There are types at '/Users/andrew.maccuaig/Projects/mx-lunch-money-sync/node_modules/@mxenabled/web-widget-sdk/dist/types/src/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@mxenabled/web-widget-sdk' library may need to update its package.json or typings.ts(7016)

https://arethetypeswrong.github.io/?p=%40mxenabled%2Fweb-widget-sdk%400.0.11

Expected behavior

No TSC errors loading the TS types.

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